Problem D: 置换

Time Limit: 1 Sec Memory Limit: 512 MB

HINT

data