#include using namespace std; using ll=long long; using pll=pair; using tll=tuple; using ld=long double; const ll INF=(1ll<<60); #define rep(i,n) for (ll i=0;i<(ll)(n);i++) #define all(v) v.begin(),v.end() template void chmin(T &a,T b){ if(a>b){ a=b; } } template void chmax(T &a,T b){ if(a> t >> n >> money; vector s(n),p(n),r(n); rep(c,3){ ll mx=0; for(ll i=1;i<=5;i++){ if(500000*(1<<(i-1))<=money) mx=i; } if(mx!=0){ cout << "2 " << mx << "\n"; cout.flush(); }else{ ll k=money/(500*n); cout << "1 "; rep(i,n) cout << k << " "; cout << "\n"; cout.flush(); } cin >> money; rep(i,n) cin >> s[i]; rep(i,n) cin >> p[i]; rep(i,n) cin >> r[i]; } ll idx=0,mn=INF; rep(i,n){ if(r[i]> money; rep(i,n) cin >> s[i]; rep(i,n) cin >> p[i]; rep(i,n) cin >> r[i]; } }