#!/usr/local/bin/python3

adrian = "A, B, C, A, B, C, A, B, C, A, B, C".split(',')
bruno = "B, A, B, C, B, A, B, C, B, A, B, C".split(',')
goran = "C, C, A, A, B, B, C, C, A, A, B, B".split(',')

print(adrian)

n = int(input())
q = input()
