#include "redica.h"
#include <bits/stdc++.h>

using namespace std;

void solve(int N, int K, int S)
{
    vector<int>a;
    int sb=0;
    for(int i=0; i<N-1; i++)
    {
        a.push_back(query());
        sb+=a[i];
    }
    a.push_back(S-sb);
    submit (a);
}
