#include using namespace std; using UL = unsigned int; using LL = long long; using ULL = unsigned long long; #define rep(i,n) for(int i=0; i<(n); i++) UL x=0,y=1,z=2,w=3; UL generate(){ UL t=(x^(x<<11)); x=y; y=z; z=w; w=(w^(w>>19))^(t^(t>>8)); return w; } UL G[5000002]; UL p=0; void push(UL v){ G[p++]=v; UL i=p-1; while(i!=0){ UL to=(i-1)/2; if(G[to]>=G[i]) return; swap(G[to],G[i]); i=to; } } UL top(){ return G[0]; } void pop(){ swap(G[0],G[--p]); int i=0; while(true){ UL to1=i*2+1,to2=i*2+2; UL to=p; if(to2G[to2])?to1:to2; } else if(to1>x; rep(i,5000001) push(generate()); rep(i,5000000) push(generate()),pop(); cout<