def from_cycle_notation(permutation, n):
    """
    Convert a permutation from cycle notation to one-line notation.

    :param permutation: Permutation in cycle notation (list of tuples fo cycles in the permutation).
    :param n: Length of the permutation (needed since length 1 cycles are omitted in the cycle notation).
    :return: Permutation in one-line notation (length n tuple of the numbers 0, 1, ..., n-1).

    .. rubric:: Examples

    >>> from_cycle_notation([(0, 1, 4), (2, 3)], 6)
    (1, 4, 3, 2, 0, 5)
    """
    image = [-1] * n
    # Record image of all cycles
    for perm_cycle in permutation:
        for i in range(len(perm_cycle) - 1):
            image[perm_cycle[i]] = perm_cycle[i + 1]
        image[perm_cycle[len(perm_cycle) - 1]] = perm_cycle[0]
    # Handle elements mapping to them selves (length one cycles)
    for i in range(len(image)):
        if image[i] == -1:
            image[i] = i
    return tuple(image)