Given a list of tasks each with the priority, some of which depends on other tasks for executions. Find the right order of tasks in which they should be executed.
Example Input:
t1, 0
t2, 1, [t1, t3]
t3, 2, [t4]
t4, 1
t5, 100Output:
t1, t4, t3, t2, t5