def square(n : Int32) sqrt = Math.sqrt(n).to_i + 1 while sqrt * sqrt > n sqrt -= 1 end sqrt end n = read_line.to_i a = [] of Int32 while n > 0 s = square(n) a << s - 1 n -= s * s end now = 'a' puts a.map_with_index { |x, i| if x == 0 now.tap { now += 1 } else c1, c2 = now, now + 1 now += 2 "#{c1}#{c2}" * x + c1 end }.join