from typing import List


def postorder_blocks(cfg: List[List[int]]) -> List[int]:
    """Returns a post-ordering of `cfg`'s indices."""
    visited = set()
    acc = []

    def _dfs(idx):
        if idx not in visited:
            visited.add(idx)
            for succ in cfg[idx]:
                _dfs(succ)
            acc.append(idx)

    for i in range(len(cfg)):
        _dfs(i)

    return acc