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

using namespace std;

void solve(int N, int K, int S) {
    int Found_Sum = 0;
    vector<int> ans;
    for(int i = 1; i < N; i++){
        int x = query();
        Found_Sum += x;
        ans.push_back(x);
    }
    ans.push_back(S - Found_Sum);
    submit(ans);
}
