def convert_index(idx, m, n):
    """
    Convert 1D index into 2D

    :param idx: 1D index
    :type idx: int
    :param m: number of rows
    :type m: int
    :param n: number of columns
    :type n: int
    :return: 2D index
    :rtype: tuple[int]
    """
    return idx // n, idx % n