import os import io import sys from math import * from collections import defaultdict as dd from collections import * import time import itertools as it import string from functools import lru_cache, reduce # sourcery skip: de-morgan adj = [(-1, 0), (0, 1), (1, 0), (0, -1)] adj4 = adj directions = { "N": (-1, 0), "S": (1, 0), "E": (0, 1), "W": (0, -1), "U": (-1, 0), "D": (1, 0), "L": (0, -1), "R": (0, 1), "^": (-1, 0), "V": (1, 0), "v": (1, 0), "<": (0, -1), ">": (0, 1), } complement = { "N": "S", "S": "N", "E": "W", "W": "E", "U": "D", "D": "U", "L": "R", "R": "L", } complements = complement adj8 = [(i, j) for i in range(-1, 2) for j in range(-1, 2) if not (i == 0 and j == 0)] enu = enumerate def prod2(x): res = 1 for i in x: res *= i return res def print_board(board, sep=''): # print(f"{x_pos=} {y_pos=}") lo_y = min(board.keys(), key=lambda x: x[0])[0] hi_y = max(board.keys(), key=lambda x: x[0])[0] lo_x = min(board.keys(), key=lambda x: x[1])[1] hi_x = max(board.keys(), key=lambda x: x[1])[1] for y in range(lo_y, hi_y + 1): for x in range(lo_x, hi_x + 1): print(board[y, x], end=sep) print() input2 = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline def debug(*args, **kwargs): print(*args, "]]", **kwargs, file=sys.stderr) def manhat(p1, p2): '''returns manhattan distance between two points''' return sum(abs(a-b) for a, b in zip(p1, p2)) def printe(x, sort=False): it = x if sort: it = sorted(it) if isinstance(x, dict): it = sorted(x.keys()) for i in it: if isinstance(x, dict): debug(i, x[i]) else: debug(i) def num(): return(int(input2())) def nums(): return(list(map(int,input2().split()))) def words(): return input().split() def input(): return(input2().strip().decode("utf-8")) def t_sorted(x): return tuple(sorted(x)) def solve():# sourcery skip: for-index-underscore, remove-redundant-pass n = num() letters = string.ascii_uppercase to_remove = 26 times = 1 while n - to_remove > 0: n -= to_remove to_remove += 26 times += 1 debug(n) return letters[(n-1)//times] pass def floats(): return(list(map(float,input2().split()))) def str_list(lis, sep=' '): return sep.join(list(map(str, lis))) def main(): # debug("test") cases = num() for t in range(1, cases+1): sys.stdout.write(f"Case #{t}: ") sys.stdout.write(f"{solve()}\n") main()