#include //const static double de_PI = 3.14159265358979323846; //const static int de_MOD = 1000000007; //const static int de_MAX = 999999999; //const static int de_MIN = -999999999; int main(void) { //std::ifstream in("123.txt"); std::cin.rdbuf(in.rdbuf()); std::string ans = "0000000000", result; int before = -1, now = -1, i = 0; while (1) { std::cout << ans << std::endl; std::cin >> now >> result; if (result == "unlocked") { return 0; } if (before == -1) { if (now == 0) { for (int j = 0; j < 10; j++) { ans[j]++; } continue; } before = now; ans[i]++; continue; } if (before < now) { i++; before = now; ans[i]++; continue; } if (before > now) { ans[i]--; i++; ans[i]++; continue; } ans[i]++; } }