import random
letters = "abcdefghijklmnopqrstuvwxyz"

T = 200
print T
for i in xrange(T):
	N = random.randint(1, 100)
	print
	print N
	for j in xrange(N):
		name = []
		for k in xrange(random.randint(1, 10)):
			name.append(random.choice(letters))
		print "{} {}".format(''.join(name), random.choice([15,20]))
