Jumps

medium
https://codeforces.com/problemset/problem/1455/B

Input Format

Check Link

Output Format

Check Link

Constraints

Check Link

Example

Input
5
1
2
3
4
5
Output
1
3
2
3
4
Previous
Yet Another Array Restoration
Next
Almost All Divisors

Related Questions