Module: Workshop - 6: "May the force be with you!"


Problem

4 /6


flip jumps

Problem

A group of younglings are handled by one Jedi, but when they move up to the rank of Padawan, one Jedi Master is attached to them, individually. It was braided behind the right ear, and the rest of the hair was neatly styled.

The Padawan accompanied his master on every dangerous mission in the galaxy. But sometimes the master could leave his student if he thought that this task was too tough for him.

The Padawans lived and trained not only in the temple, but also in special academies and starships.

Padawans also had group training sessions. In group trainings, flip jumps were practiced. & nbsp; The meaning of the training was as follows: it was necessary to turn over in a jump and change your position in such a way that the line of all the Padawans lined up in the reverse order.

Let's enumerate all Padawans in the line with natural numbers 1, 2, 3, ..., N (\(1 <= N < ;= 1000\)).
Write a program that will determine the final position of the Padawans after two flip jumps. First, flip jumps are made from padawan number A to padawan number B, and then from C to  D (\(A<B\)\(C < D\); \(1 <= A, B, C, D <= N\)).


Input 
Enter natural numbers numbers NABC, < code>D.

Imprint 
You want to output the resulting sequence.
 
Examples
# Input Output
1 9 2 5 6 9 1 5 4 3 2 9 8 7 6
2 9 3 6 5 8 1 2 6 5 8 7 3 4 9