def match(s1, s2):
    """
    Checks if two strings matches each other except for one character.

    Args:
        s1, s1 (str): String with the same length.
    Returns:
        int: The index of the character the differs.
    """
    pos = -1
    for i, (c1, c2) in enumerate(zip(s1, s2)):
        if c1 != c2:
            if pos != -1:
                return -1
            else:
                pos = i
    return pos