def main():
  n = int(input())
  li  = []
  li.append(["a"])
  for i in range(9):
    x = li[i]
    y = []
    for j in x:
      y.append(j + "a")
      y.append(j + "b")  
    y.sort()
    li.append(y)
  ans = li[n-1]
  for i in ans:
    print(i)  

if __name__ == '__main__':
  main()