def bits_to_base(x):
    """convert integer representation of two bits to correct base"""
    if x == 0:
        return 'T'
    elif x == 1:
        return 'C'
    elif x == 2:
        return 'A'
    elif x == 3:
        return 'G'
    else:
        raise ValueError('Only integers 0-3 are valid inputs')