#!/usr/bin/env python n = int(input()) for i in range(n): print('A' * (i +1), end='') print('B' * (n - i - 1))