def alpha_ordering(index, collection):
    """
    0 -> A, 1 -> B, ... 25 -> Z, 26 -> AA, 27 -> AB, ...
    """
    s = ""
    while index > 25:
        d = index / 26
        s += chr((d % 26) + 64)
        index -= d * 26
    s += chr(index + 65)
    return s