n = gets.to_s.to_i op = [] of Int32 while n > 1 if n.odd? n -= 1 op << 1 end n //= 2 op << 2 end cnt = [0] op.reverse.each do |o| case o when 1 x = cnt[0] + 1 cnt = [x] + cnt + [x] when 2 x = cnt[0] cnt = [x] + cnt + [x] end end ans = cnt.map(&.%(26).+('a'.ord).chr).join puts ans