import itertools
import random

# Seed chosen 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)])

s_len_limit = 200000
t_sum_limit = 200000

print(''.join([seeded_random.choice(alphabet) for _ in range(s_len_limit)]))
t_strs = []
t_len = 1
t_sum = 0
while t_sum + t_len <= t_sum_limit:
  for t in itertools.product(alphabet, repeat=t_len):
    t_strs.append(''.join(t))
    t_sum += t_len
    if t_sum + t_len > t_sum_limit:
      break
  t_len += 1
print(len(t_strs))
for t in t_strs:
  order_upper_bound = max(10, int(2 * s_len_limit / (26 ** len(t))))
  print('%s %d' % (t, seeded_random.randint(1, order_upper_bound)))

