def canonical_perm_i(part, i=0):
    """
    Return the canonical permutation reversed.

    EXAMPLES::

        sage: from surface_dynamics.flat_surfaces.separatrix_diagram import canonical_perm_i
        sage: canonical_perm_i([3,2])
        [2, 0, 1, 4, 3]
        sage: canonical_perm_i([2,2,2])
        [1, 0, 3, 2, 5, 4]
        sage: canonical_perm_i([1,1,3])
        [0, 1, 4, 2, 3]
    """
    res = []
    for p in part:
        res.append(i + p - 1)
        res.extend(range(i, i + p - 1))
        i += p
    return res
