local n = io.read("*n") local p = 1 local s = {"ab", "cd", "ef"} local t = {"a", "c", "e"} while 0 < n do local a = 1 for i = 1, n do local v = i * 2 - 1 + i * (i - 1) / 2 if n < v then break end a = i end if 1 < a then io.write(string.rep(s[p], a - 1)) io.write(t[p]) n = n - a * 2 + 1 - a * (a + 1) / 2 else io.write(t[p]) n = n - 1 end p = p + 1 if p == 4 then p = 1 end end io.write("\n")