#include #include #include #include using namespace std; int main(){ int i=0; string s; while(1){ if(i>1000)break; cout << setfill('0') << setw(3) << i<>s; if(s=="unlocked")break; else if(s=="locked")i++; } return 0; }