p2 = "ABACBC" p3 = "ABACBACBC" q = io.read("*n") for iq = 1, q do n = io.read("*n") if n % 2 == 1 then io.write(p3) n = n - 3 end n = math.floor(n / 2) print(string.rep(p2, n)) end