def a_to_i(text):
    """
    Converts a string to an int if possible
    :param text: str to possibly be converted
    :return: either int (if text could be converted) or the same str back
    """
    return int(text) if text.isdigit() else text