#include "redica.h"
#include <bits/stdc++.h>
using namespace std;
void solve(int N, int K, int S) 
{
    int need=S;
    vector<int> v;
    int rem=N;
    while(1)
    {
        vector<int> test=v;
        while(test.size()<N)
        {
            test.push_back(max(1,need-(rem-1)*K));
        }
        submit(test);
        int x=quaery();
        v.push_back(x);
        need-=x;
        rem--;
    }
}