#include using namespace std; using i64 = int64_t; using vi = vector; using vvi = vector; string num = "0000000000"; int digit = 0; int crtres = -1; void ans() { cout << num << endl; int res; cin >> res; string hoge; cin >> hoge; if (res == 10) { exit(0); } if (crtres == -1) { crtres = res; num[digit]++; } else if (crtres > res) { num[digit]--; digit++; } else if (res > crtres) { digit++; crtres = res; } else { num[digit]++; } } int main() { while (1) { ans(); } }