PROGRAMMING:Who is the real richest man
There are n rich people. They get together and want to know who is the richest among them. However, all of them hide their property. According to the survey, you know the wealth relationship among m rich people. Now you have to infer who is the richest man among these n people according to the existing relationship information.
###Input format:
Multiple sets of input. Input 2 integers n, m (0 < = m, n < = 1000000) in the first line of each group, and end the input when n = M = 0. Next, enter an integer a (1 < = a < = n), a character c, and an integer B (1 < = B < = n) for each line, indicating the wealth relationship between the rich numbered a and the rich numbered B (a is not equal to b). There are only two kinds of relationships: greater than or less than. Ensure that there is no contradiction in the input relationship, such as 1 > 2, 2 > 3, 3 > 1.
output
###Output format:
If we can infer who is the richest man, we will output the number of the richest man, otherwise we will output "no solution" (without double quotation marks).
sample input
###Input example:
Here is a set of inputs. For example:
```in
3 2
1 > 3
2 > 3
3 2
1 > 2
2 > 3
```
###Output example:
The corresponding output is given here. For example:
```out
no solution
one
```
answer:If there is no answer, please comment
###Input format:
Multiple sets of input. Input 2 integers n, m (0 < = m, n < = 1000000) in the first line of each group, and end the input when n = M = 0. Next, enter an integer a (1 < = a < = n), a character c, and an integer B (1 < = B < = n) for each line, indicating the wealth relationship between the rich numbered a and the rich numbered B (a is not equal to b). There are only two kinds of relationships: greater than or less than. Ensure that there is no contradiction in the input relationship, such as 1 > 2, 2 > 3, 3 > 1.
output
###Output format:
If we can infer who is the richest man, we will output the number of the richest man, otherwise we will output "no solution" (without double quotation marks).
sample input
###Input example:
Here is a set of inputs. For example:
```in
3 2
1 > 3
2 > 3
3 2
1 > 2
2 > 3
```
###Output example:
The corresponding output is given here. For example:
```out
no solution
one
```
answer:If there is no answer, please comment