tsort takes a list of pairs of node names representing directed arcs in a graph and prints the nodes in topological order on standard output.