#include int T,n,cnt,ans[81]; bool v[80]; void dfs(int t,int s){ if(t==n) return (void)(++cnt); v[s]=true; int p=s+t>=n?s+t-n:s+t; if(!v[p]) dfs(t+1,p); p=s