Problems
Double reverse
Double reverse
Given a sequence of positive integers 1, 2, 3, ..., n. Arrange first in reverse order the part of this sequence starting from the element with number a to the element with number b, and then reverse the subsequence starting from element with number c to the element with number d.
Input data
Given the integers n (1 ≤ n ≤ 1000), a, b, c, d (a < b, c < d, 1 ≤ a, b, c, d ≤ 1000)..
Output data
Print the resulting sequence.
Examples
Input example #1
9 2 5 6 9
Output example #1
1 5 4 3 2 9 8 7 6
Input example #2
9 3 6 5 8
Output example #2
1 2 6 5 8 7 3 4 9