from typing import List
from typing import Tuple


def row_col_cell_ids(tiling: List[List[int]]) -> List[Tuple[int, int, int]]:
    """
    Infers absolute rows and columns for every cell from the tiling of a table.

    :param tiling: A list of list of tiling of a table as returned from the :meth:`_tile_table`
    :return: A list of 3-tuples with row number, column number and cell id.
    """
    indices = sorted(
        [(i + 1, j + 1, cell_id) for i, row in enumerate(tiling) for j, cell_id in enumerate(row)], key=lambda x: x[2]
    )
    seen = set()
    rows_col_cell_ids = [(a, b, c) for a, b, c in indices if not (c in seen or seen.add(c))]  # type: ignore

    return rows_col_cell_ids