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