<PREV Problem:
NEXT>
Solved by 1303 users: ...
UserDateAttemptTimeCMSC
cono09 jan 2010Perl400.2653 
sb3ar03 may 2008Ruby200.0357 
bush07 mar 2006Ruby200.0274 
Nakilon24 apr 2010Ruby2101.4576 
hbk07 jun 2006Python200.0788 
prashmohan22 dec 2005Python700.0788 
pshen20 nov 2012C++3400.0191 
ravehanker19 dec 2005Python900.0791 
s01A0614 mar 2011C6700.0198 
s01A0614 mar 2011C6800.0198 
Alexsss24 sep 2008Python200.0898 
s01A0613 dec 2010C5900.0199 
s01A0613 jan 2011C6100.0199 
s01A0613 jan 2011C6200.0199 
ravehanker07 nov 2007Python1100.07100 
pshen20 nov 2012C++2800.01101 
pshen20 nov 2012C++2600.01109 
Languages
C++
657
FPC
324
C
199
Java
57
Kylix
50
Python
17
Ruby
13
Lua
5
Perl
5
Haskell
2
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 

Contest Table

Time limit: 5 seconds.

In a reversi contest every two participants played one game against each other, and there were no draws. You should list the participants in such order that every player won his game against the next player in the list. There may be several orderings satisfying this condition, and you should output one of them.

Input. First line of input contains the number of players n (0 < n < 200 ). Then n lines representing the contest table follow, consisting of characters '+', '-', and '#'. The M-th line of the table has length M, with L-th symbol being '+' if the M-th player won the game against the L-th and '-' otherwise; the last symbol in each line is '#'.

Output. Numbers 1,2, ... N separated with space and listed in proper order.

SAMPLE INPUT:
4
#
+#
-+#
-+-#
SAMPLE OUTPUT:
1 3 4 2 

Autors:
Voroztsov Artem

<PREV | Problem set | Search related messages | NEXT>


© acm.mipt DevGroup
The page was generated in 220ms

SW soft NIX
ID = 3.229.142.175