#C1001. GHCSC Lesson 5 Dictionary Exercise 4
GHCSC Lesson 5 Dictionary Exercise 4
Write a function reverse_dict(d) that swaps the keys and values of a dictionary. Assume all values are unique.
INPUT FORMAT
First line contains an integer From the second line to the line, each line contains a key and a value, separated by a blank space.
OUTPUT FORMAT
Ouput lines, each line contains a key and a value, separated by a blank space. The key should be outputed in the dictionary order.
SAMPLE
INPUT
3
a c
b d
c e
OUTPUT
c a
d b
e c