PROGRAMMING:Task topology sort
A project is decomposed into n subtasks, numbered from 0 to n-1. To complete the whole project, we need to complete all the subtasks. Some of the subtasks must be completed before others. Given the sequence relationship between the sub tasks, please write a program to give a reasonable task completion sequence. If the project is not feasible, the program can also identify.
###Input format:
Enter two integers n and E in the first line, both of which are no more than 100. N is the number of subtasks. Next, line e represents the sequence relationship between two known subtasks. Each line contains two integers a and B, indicating that task a must be completed before task B.
###Output format:
If the project is not feasible (some subtasks are based on themselves), output "unworkable project"; If the project is feasible, the output is a line of integers, and a space after each integer is the number of N subtasks, indicating the completion order of subtasks. If there are many possible orders, the output dictionary order is the smallest.
Note: dictionary order is the order of objects in the dictionary. For two digit sequences, the comparison starts from the first digit. When the digits in a certain position are different, the sequence with smaller digits in that position has smaller dictionary order, for example, 1239 is smaller than 1245, 1289 is smaller than 12103.
###Input sample 1:
```in
3 2
0 1
1 2
```
###Output sample 1:
```out
0 1 2
```
###Input sample 2:
```in
3 3
0 1
1 2
2 0
```
###Output sample 2:
```out
unworkable project
```
answer:If there is no answer, please comment
###Input format:
Enter two integers n and E in the first line, both of which are no more than 100. N is the number of subtasks. Next, line e represents the sequence relationship between two known subtasks. Each line contains two integers a and B, indicating that task a must be completed before task B.
###Output format:
If the project is not feasible (some subtasks are based on themselves), output "unworkable project"; If the project is feasible, the output is a line of integers, and a space after each integer is the number of N subtasks, indicating the completion order of subtasks. If there are many possible orders, the output dictionary order is the smallest.
Note: dictionary order is the order of objects in the dictionary. For two digit sequences, the comparison starts from the first digit. When the digits in a certain position are different, the sequence with smaller digits in that position has smaller dictionary order, for example, 1239 is smaller than 1245, 1289 is smaller than 12103.
###Input sample 1:
```in
3 2
0 1
1 2
```
###Output sample 1:
```out
0 1 2
```
###Input sample 2:
```in
3 3
0 1
1 2
2 0
```
###Output sample 2:
```out
unworkable project
```
answer:If there is no answer, please comment