CF220C Little Elephant and Shifts
Description
The Little Elephant has two permutations $ a $ and $ b $ of length $ n $ , consisting of numbers from 1 to $ n $ , inclusive. Let's denote the $ i $ -th $ (1
Input Format
The first line contains a single integer $ n $ $ (1
Output Format
In $ n $ lines print $ n $ integers — the answers for cyclic shifts. Print the answers to the shifts in the order of the shifts' numeration in permutation $ b $ , that is, first for the 1-st cyclic shift, then for the 2-nd, and so on.