John has tasks to do. Unfortunately, the tasks are not independent and the execution of one task is only possible if other tasks have already been executed.
Consist of several instances of the problem. Each instance begins with a line containing two integers: number of tasks , numbered from to and number of direct precedence relations between tasks. After this, there will be lines with two integers and , representing the fact that task must be executed before task .
An instance with will finish the input.
For each instance, print a line with integers representing the tasks in a possible order of execution.