Divisible Permutation

2 secs 1024 MB
mel1's icon mel1

testcase-30.txt


入力

出力