Eric has a lot of shoes, way too many shoes.
On the floor, there are
As there is more than one possible answer, you may output any of them. Furthermore, the input is guaranteed to have at least one valid solution.
Constraints
L
or R
. The amount of L
and R
will always be the same.
Input Specification
The first and only line of input will contain
Output Specification
You are to output
The pairs can be printed in any order, and the numbers within each pair can be printed in any order.
Sample Input
L R L R
Sample Output
1 2
3 4
Sample Explanation
We can pair up the first 2 shoes, and the last 2 shoes in order to make pairs. Another valid solution is to pair up the first and last shoe, and then the 2nd and 3rd shoe.
Comments