#include "bits/stdc++.h" #define REP(i,n,N) for(int i=(n); i<(N); i++) #define RREP(i,n,N) for(int i=(N-1); i>=n; i--) #define CK(n,a,b) (a)<=(n)&&(n)<(b) #define ALL(v) (v).begin(),(v).end() #define p(s) cout<<(s)<>now>>ok; if(ok=="unlocked") return 0; s[idx]++; cout<>now>>ok){ if(ok=="unlocked") break; if(prev==now) s[idx]++; else if(prev>now){ s[idx]--; idx++; s[idx]++; now++; } else { idx++; s[idx]++; } prev = now; cout<