#! /usr/bin/python3

import sys
import csv

csvr = csv.reader(sys.stdin)
header = next(csvr)
indexheader = {v:i for i,v in enumerate(header)}
table = [[int(x) if not x[0].isalpha() else x for x in row] for row in csvr]
#for row in table:
#	print(row)
count=0
print('<table id="cann-table">')
for pt in range(table[0][-1], table[-1][-1] - 1, -1):
	clubs = [row[2] for row in table if row[-1] == pt]
	label = '1' if count < 3 else '2'
	count = (count + 1) % 6
	print('\t<tr class="cann-row-' + label + '">') 
	print('\t\t<td class="cann-point">', pt, '</td>')
	print('\t\t<td class="cann-clubs">')
	for club in clubs:
		print('\t\t\t<span class="club-name">', club, '</span>')
	print('\t\t</td>\n', '\t</tr>')
print('</table>')

