#include using namespace std; using Int = long long; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a; vector res(22); BS all(0); for(int i=0;i>BIT][i&MSK]=a&1; a=(1LL*x*a+y)%z; } int q; scanf("%d",&q); for(int i=0;i>BIT)+1)<>BIT]>>(a&MSK); tmp|=(res[p>>BIT]&(all>>(MSK^(b-p))))<<(p-a); }else{ tmp|=(res[a>>BIT]>>(a&MSK))&(all>>(MSK^(b-a))); } int q=((c>>BIT)+1)<>BIT]^=tmp<<(c&MSK); res[q>>BIT]^=tmp>>(q-c); } for(int i=0;i>BIT][i&MSK]?'O':'E'); puts(""); return 0; }