aboutsummaryrefslogtreecommitdiff
path: root/challenge-122/abigail/python/ch-2.py
blob: 2c10b39f252b229356ff6b15b0c5934b692da05e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/opt/local/bin/python

#
# See ../README.md
#

#
# Run as: python ch-2.py < input-file
#

import sys

n = int (sys . stdin . readline ())

scores = [[], [], [""]]

for i in range (n):
    new = []
    for j in range (3):
        for k in scores [len (scores) - 1 - j]:
            new . append (str (j + 1) + " " + k)
    scores . append (new)

for score in scores [-1]:
    print (score)