package main import . "fmt" import . "math/rand" func main() { var n int Scan(&n) x:=Perm(n) y:=Perm(n) for _,r:=range y { for i,c:=range x { if i>0 { Print(" ") } v:=(c+r)%n+1 Print(v) } Println() } }