1 class Solution: 2 def generateTheString(self, n: int) -> str: 3 if n == 1: 4 return 'a' 5 elif n == '2': 6 return 'ab' 7 else: 8 if n % 2 == 0: 9 return 'a' * (n-1) + 'b' 10 else: 11 return 'a' * (n-2) + 'bc'