R=range(n:=int(input()));f=[1] for i in R(n):f+=f[-1]*-~i, def a(t): m=[0]*n;s=[*R] for i in R:m[i]=s.pop(t//f[n-i-1])+1;t%=f[n-i-1] return m l,r=0,f[n] while l+1>1)) if'0'