#include using namespace std; typedef long long ll; typedef pair pii; typedef pair ppii; typedef pair pipi; typedef pair pll; typedef pair plpl; typedef tuple tl; ll mod=1000000007; ll mod2=998244353; ll inf=1000000000000000000; #define rep(i,m,n) for(int i=m;i=m;i--) ll lmax(ll a,ll b){ if(a>l>>d; if(d==1||l<=5){ cout<<"matsu"< st; rep(j,1,ceil((double)i/3)){ rep(k,j+2,j+d+1){ if(j+j+1+k>i)break; if(i-j-k>=k||i-j-k<=j)continue; st.insert(g[j]^g[k]^g[i-j-k]); } } int gg=0; while(st.count(gg)!=0)gg++; g[i]=gg; } if(g[l]==0)cout<<"matsu"<