#include <bits/stdc++.h>
#include "redica.h"
using namespace std;

void solve(int n, int k, int s)
{
    vector<int> v;
    int ss = s;
    for (int i = 1; i < n; i++)
    {
        v.push_back(query());
        ss -= v.back();
    }
    v.push_back(ss);
    submit(v);
}