PROGRAMMING:Team "food chain"
There are $$n $$teams in the Football League of a certain country, whose numbers range from 1 to $$n $. The League adopts the home and away round robin competition system, with teams playing one game each at home.
After the league game, the result has been settled. At this time, the chairman of the league has a whim, hoping to find out a "food chain" that includes all teams to illustrate the brilliance of the league“ The "food chain" is an arrangement from 1 to $$n $${$$t "_ 1$$ $$T_ 2$$ $$\cdots$$ $$T_ N $$}, satisfy: team $$t_ 1 $$beat the team $$t_ 2 $$, team $$t_ 2 $$beat the team $$t_ 3 $$, $$cdots $$, team $$t_{( N-1)} $$beat team $$t_ N $$, team $$t_ N $$beat team $$t_ 1$$。
Now president, please find out the "food chain" from the League results. If there are multiple "food chains", please find the one with the smallest dictionary order.
Note: arrangement {$$a_ 1$$ $$a_ 2$$ $$\cdots$$ $$a_ N $$} is less than {$$B} in dictionary order_ 1$$ $$b_ 2$$ $$\cdots$$ $$b_ N $$}, if and only if there is an integer $$k $$($$1 / Le K / Le n $$), satisfying: $$a_ K < b_ K $$and for any positive integer $$I $$, $$a less than $$k $$_ i=b_ i$$。
###Input format:
Enter the first line to give an integer $$n $$($$2 / Le n / Le 20 $$) for the number of participating teams. Then, in the $$n $$line, each line contains $$n $$characters, and the League result table of $$n times n $$is given. The characters in the $$I $$line and $$J $$column are the results of the game in which the team $$I $$plays against the team $$J $$at home: ` W 'means that the team $$I $$wins the team $$J $, ` L' means that the team $$I $$loses to the team $$J $, ` d 'means that the two teams draw, and' - 'means that it is invalid (when $$I = J $). There are no extra spaces in the input.
###Output format:
Find "food chain" $$t according to the title_ 1$$ $$T_ 2$$ $$\cdots$$ $$T_ N $$, output the number of N $$on a line in turn, the numbers are separated by a space, and there must be no extra space at the beginning and end of the line. If there is no "food chain", output "no solution".
###Input sample 1:
```in
five
-LWDW
W-LDW
WW-LW
DWW-W
DDLW-
```
###Output sample 1:
```out
1 3 5 4 2
```
###Input example 2:
```
five
-WDDW
D-DWL
DD-DW
DDW-D
DDDD-
```
###Output example 2:
```
No Solution
```
answer:If there is no answer, please comment
After the league game, the result has been settled. At this time, the chairman of the league has a whim, hoping to find out a "food chain" that includes all teams to illustrate the brilliance of the league“ The "food chain" is an arrangement from 1 to $$n $${$$t "_ 1$$ $$T_ 2$$ $$\cdots$$ $$T_ N $$}, satisfy: team $$t_ 1 $$beat the team $$t_ 2 $$, team $$t_ 2 $$beat the team $$t_ 3 $$, $$cdots $$, team $$t_{( N-1)} $$beat team $$t_ N $$, team $$t_ N $$beat team $$t_ 1$$。
Now president, please find out the "food chain" from the League results. If there are multiple "food chains", please find the one with the smallest dictionary order.
Note: arrangement {$$a_ 1$$ $$a_ 2$$ $$\cdots$$ $$a_ N $$} is less than {$$B} in dictionary order_ 1$$ $$b_ 2$$ $$\cdots$$ $$b_ N $$}, if and only if there is an integer $$k $$($$1 / Le K / Le n $$), satisfying: $$a_ K < b_ K $$and for any positive integer $$I $$, $$a less than $$k $$_ i=b_ i$$。
###Input format:
Enter the first line to give an integer $$n $$($$2 / Le n / Le 20 $$) for the number of participating teams. Then, in the $$n $$line, each line contains $$n $$characters, and the League result table of $$n times n $$is given. The characters in the $$I $$line and $$J $$column are the results of the game in which the team $$I $$plays against the team $$J $$at home: ` W 'means that the team $$I $$wins the team $$J $, ` L' means that the team $$I $$loses to the team $$J $, ` d 'means that the two teams draw, and' - 'means that it is invalid (when $$I = J $). There are no extra spaces in the input.
###Output format:
Find "food chain" $$t according to the title_ 1$$ $$T_ 2$$ $$\cdots$$ $$T_ N $$, output the number of N $$on a line in turn, the numbers are separated by a space, and there must be no extra space at the beginning and end of the line. If there is no "food chain", output "no solution".
###Input sample 1:
```in
five
-LWDW
W-LDW
WW-LW
DWW-W
DDLW-
```
###Output sample 1:
```out
1 3 5 4 2
```
###Input example 2:
```
five
-WDDW
D-DWL
DD-DW
DDW-D
DDDD-
```
###Output example 2:
```
No Solution
```
answer:If there is no answer, please comment