def to_index(char):
    """
    Converts char to class index
    :param char: 0-9 =, a-z, A-Z
    :return: corresponding class index
    """
    if ord(char) < 59:
        return ord(char) - 48
    elif ord(char) < 95:
        return ord(char) - 55
    else:
        return ord(char) - 61