P353: Enumeration of all $t$-ary trees in A-order

P353: Enumeration of all $t$-ary trees in A-order
Input:
Integers $t$ and $n$.
Output:
All $t$-ary trees with $n$ vertices in A-order.
Complexity:
$O(1)$ amortized time per solution.
Comment:
Reference:
[VanBaronaigien1988] (Bibtex)