#include #include #include #include #include #include #include using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int a[4] = { 0 }; while(true) { for(int i = 0; i < 4; i++) { int maxj = -1, maxx = -1; for(int j = 0; j < 10; j++) { a[i] = j; for(int k = 0; k < 4; k++) { cout << a[k] << " "; } cout << endl; cout.flush(); int X, Y; cin >> X >> Y; if(X == 4) return 0; if(maxx < X) { maxx = X; maxj = j; } } a[i] = maxj; } } }