#include int N,i=-2,j,a;main(){std::mape,s,A;for(;++i>a;for(;s[a=A[j]]=jfirst<<(N>++j?" ":"\n");}