import random

s_len_limit = 200000
query_limit = 200000

# Seed generated by arknave's fair dice roll. Guaranteed to be random.
seed = 97

seeded_random = random.Random(seed)

alphabet = ''.join([chr(ord('a') + i) for i in range(26)])

print(''.join(seeded_random.choice(alphabet) for _ in range(s_len_limit)))
print(query_limit)
for _ in range(query_limit):
  print('%s %d' % (seeded_random.choice(alphabet), seeded_random.randint(1, s_len_limit)))

