Given a list of class prereqs, outputs order of classes using a graph