#define _USE_MATH_DEFINES #include #define FOR(i,a,b) for(int i = (a); i < (b); ++i) #define REP(i,n) FOR(i,0,n) #define SZ(n) (int)(n).size() #define ALL(n) (n).begin(), (n).end() #define MOD 1000000007 using namespace std; typedef long long LL; typedef vector VI; int main() { char s[3]; string re; REP(i, 10) { s[0] = i; REP(j, 10) { s[1] = j; REP(k, 10) { s[3] = k; printf("%c%c%c\n", s[0], s[1], s[2]); scanf("%s", re); if (re == "locked") continue; if (re == "unlocked") return 0; } } } return 0; }