A pipeline scheduler receives dependency pairs "A B" meaning task A must run
BEFORE task B. The task set is exactly the tasks mentioned in the pairs.
Print a valid execution order. When several tasks are simultaneously
runnable, run the alphabetically smallest first (this makes the answer
unique). If the dependencies contain a cycle, print exactly: CYCLE
Input Format:
Line 1: m (number of dependency pairs)
Lines 2 to m+1: "<task_a> <task_b>" — task_a runs before task_b
Output Format:
The task names in execution order, one per line — or the single line
CYCLE.