Given a list of flights - denoted as pairs of departure and arrival cities - print the itinerary, i.e. the order the person will take the flights.
For example, given:
(New York -> Beijing), (Mumbai -> Amsterdam), (Beijing -> Mumbai), (Amsterdam -> Sydney)
Print out:
New York -> Beijing -> Mumbai -> Amsterdam -> Sydney