

from __future__ import annotations





def 				__a							(       __A			,							__A						):
    SCREAMING_SNAKE_CASE__         =    0
    SCREAMING_SNAKE_CASE__         =    len(__A						) - 1
    while left <= right:
        SCREAMING_SNAKE_CASE__         =    (left + right) // 2
        if left == right:
            if sorted_list[middle] < item:
                SCREAMING_SNAKE_CASE__         =    middle + 1
            break
        elif sorted_list[middle] < item:
            SCREAMING_SNAKE_CASE__         =    middle + 1
        else:
            SCREAMING_SNAKE_CASE__         =    middle - 1
    sorted_list.insert(__A			,							__A						)
    return sorted_list





def 				__a							(       __A			,							__A						):
    SCREAMING_SNAKE_CASE__         =    []
    while left and right:
        if left[0][0] < right[0][0]:
            result.append(left.pop(0						)						)
        else:
            result.append(right.pop(0						)						)
    return result + left + right





def 				__a							(       __A						):
    SCREAMING_SNAKE_CASE__         =    len(__A						)
    if length <= 1:
        return list_ad
    SCREAMING_SNAKE_CASE__         =    length // 2
    return merge(sortlist_ad(list_ad[:middle]						)			,							sortlist_ad(list_ad[middle:]						)						)





def 				__a							(       __A						):

    if len(__A						) <= 1:
        return collection
    SCREAMING_SNAKE_CASE__         =    []
    SCREAMING_SNAKE_CASE__         =    False
    for i in range(0			,							len(__A						)			,							2						):
        if i == len(__A						) - 1:
            SCREAMING_SNAKE_CASE__         =    True
        else:
            if collection[i] < collection[i + 1]:
                two_paired_list.append([collection[i], collection[i + 1]]						)
            else:
                two_paired_list.append([collection[i + 1], collection[i]]						)
    SCREAMING_SNAKE_CASE__         =    sortlist_ad(__A						)
    SCREAMING_SNAKE_CASE__         =    [i[0] for i in sorted_list_ad]
    result.append(sorted_list_ad[-1][1]						)
    if has_last_odd_item:
        SCREAMING_SNAKE_CASE__         =    collection[-1]
        SCREAMING_SNAKE_CASE__         =    binary_search_insertion(__A			,							__A						)
    SCREAMING_SNAKE_CASE__         =    False
    for i in range(len(__A						) - 1						):
        if result[i] == collection[-1] and has_last_odd_item:
            SCREAMING_SNAKE_CASE__         =    True
        SCREAMING_SNAKE_CASE__         =    sorted_list_ad[i][1]
        # If last_odd_item is inserted before the item's index,
        # you should forward index one more.
        if is_last_odd_item_inserted_before_this_index:
            SCREAMING_SNAKE_CASE__         =    result[: i + 2] + binary_search_insertion(result[i + 2 :]			,							__A						)
        else:
            SCREAMING_SNAKE_CASE__         =    result[: i + 1] + binary_search_insertion(result[i + 1 :]			,							__A						)

    return result


if __name__ == "__main__":
  A__										=      input("Enter numbers separated by a comma:\n").strip()
  A__										=      [int(item) for item in user_input.split(",")]
  print(merge_insertion_sort(unsorted))





def 				__a							(       __A			,							__A			,							__A			,							__A						):
    return len_board * len_board_column * row + column





def 				__a							(       __A			,							__A			,							__A			,							__A			,							__A			,							__A			,							):

    if board[row][column] != word[word_index]:
        return False

    if word_index == len(__A						) - 1:
        return True

    SCREAMING_SNAKE_CASE__         =    [(0, 1), (0, -1), (-1, 0), (1, 0)]
    SCREAMING_SNAKE_CASE__         =    len(__A						)
    SCREAMING_SNAKE_CASE__         =    len(board[0]						)
    for direction in traverts_directions:
        SCREAMING_SNAKE_CASE__         =    row + direction[0]
        SCREAMING_SNAKE_CASE__         =    column + direction[1]
        if not (0 <= next_i < len_board and 0 <= next_j < len_board_column):
            continue

        SCREAMING_SNAKE_CASE__         =    get_point_key(__A			,							__A			,							__A			,							__A						)
        if key in visited_points_set:
            continue

        visited_points_set.add(__A						)
        if exits_word(__A			,							__A			,							__A			,							__A			,							word_index + 1			,							__A						):
            return True

        visited_points_set.remove(__A						)

    return False





def 				__a							(       __A			,							__A						):
    SCREAMING_SNAKE_CASE__         =    (
        "The board should be a non empty matrix of single chars strings."
    )

    SCREAMING_SNAKE_CASE__         =    len(__A						)
    if not isinstance(__A			,							__A						) or len(__A						) == 0:
        raise ValueError(__A						)

    for row in board:
        if not isinstance(__A			,							__A						) or len(__A						) == 0:
            raise ValueError(__A						)

        for item in row:
            if not isinstance(__A			,							__A						) or len(__A						) != 1:
                raise ValueError(__A						)

    # Validate word
    if not isinstance(__A			,							__A						) or len(__A						) == 0:
        raise ValueError(
            "The word parameter should be a string of length greater than 0."						)

    SCREAMING_SNAKE_CASE__         =    len(board[0]						)
    for i in range(__A						):
        for j in range(__A						):
            if exits_word(
                __A			,							__A			,							__A			,							__A			,							0			,							{get_point_key(__A			,							__A			,							__A			,							__A						)}						):
                return True

    return False


if __name__ == "__main__":
  import doctest

  doctest.testmod()


