def preprocess_input(cin: str):
    """
    Maps user input into matrix indexes

    Parameters
    ----------
    cin : str
        For example F5

    Returns
    -------
    If the case was F5, it will return 4, 5
    """
    letter = cin[0]
    number = int(cin[1])

    d = {'A': 0, 'B': 1, 'C': 2,
         'D': 3, 'E': 4, 'F': 5,
         'G': 6, 'H': 7}

    x = d[letter]
    y = number - 1

    return x, y