import re from string import ascii_lowercase from typing import Optional class SelfShiritori: def __init__(self) -> None: self.start_letter_state = {letter: 0 for letter in ascii_lowercase} def create_word(self, start: str, end: Optional[str] = None) -> str: return_str = start return_str += chr(97 + (self.start_letter_state[start] // (26 ** 3)) % 26) return_str += chr(97 + (self.start_letter_state[start] // (26 ** 2)) % 26) return_str += chr(97 + (self.start_letter_state[start] // 26 % 26)) return_str += chr(97 + (self.start_letter_state[start] % 26)) if end is not None: return_str += end else: return_str += chr((ord(start)-96) % 26 + 97) self.start_letter_state[start] += 1 return return_str def main(): n = int(input()) shiritori = SelfShiritori() for idx in range(n-1): print(shiritori.create_word(chr(97 + idx % 26), )) print(shiritori.create_word(chr(97 + (n-1) % 26), "n")) if __name__ == "__main__": main()