#include  <bits/stdc++.h>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
using namespace std;

int main(void){
	rep(a,10)rep(b,10)rep(c,10){
		cout << a << b << c << endl;
		cout.flush();
		string in;
		cin >> in;
		if(in=="unlocked") return 0;
	}
	return 0;
}