city=[2101,2106,1504,1505,2201,2202,2224,1522]
station1=[12,2,3,2,5,2,1,1]
station2=[1]
print "110101~"+str(city[0])+"("+str(station2[0])+")"
print "110105~"+str(city[0])+"("+str(station1[0])+")"
print "110105~"+str(city[1])+"("+str(station1[1])+")"
print "110105~"+str(city[2])+"("+str(station1[2])+")"
print "110105~"+str(city[3])+"("+str(station1[3])+")"
print "110105~"+str(city[4])+"("+str(station1[4])+")"
print "110105~"+str(city[5])+"("+str(station1[5])+")"
print "110105~"+str(city[6])+"("+str(station1[6])+")"
print "110105~"+str(city[7])+"("+str(station1[7])+")"
station1=[12,2,3,2,5,2,1,1]
station2=[1]
print "110101~"+str(city[0])+"("+str(station2[0])+")"
print "110105~"+str(city[0])+"("+str(station1[0])+")"
print "110105~"+str(city[1])+"("+str(station1[1])+")"
print "110105~"+str(city[2])+"("+str(station1[2])+")"
print "110105~"+str(city[3])+"("+str(station1[3])+")"
print "110105~"+str(city[4])+"("+str(station1[4])+")"
print "110105~"+str(city[5])+"("+str(station1[5])+")"
print "110105~"+str(city[6])+"("+str(station1[6])+")"
print "110105~"+str(city[7])+"("+str(station1[7])+")"