Find all combinations of pairs of elements

EASY

Given a string of unique (non-repeating) numbers separated by a single space.

Find all combinations of pairs of elements and print it in any order.

Example #1

Input

1 2 3

Output

1 2
1 3
2 1
2 3
3 1
3 2

Solution