Edit - Confirmed to be the standard greedy algorithm.
In combinatorial mathematics, a superpermutation on n symbols is a string that contains each permutation of n symbols as a substring. We will do it for $n=3$. We list all permutations of length $3$:
$123$
$132$
$213$
$231$
$312$
$321$
We will assign each permutation an initial value of $0$. They can never go below it. At each step, we will add or subtract a value from $\frac{1}{n}$ to $\frac{n-1}{n}$. In this case, our choices are $\frac{1}{3}$ or $\frac{2}{3}$. Once the value of a permutation equals $\frac{3}{3}=1$, it is no longer under our consideration because it is in our superpermutation. We will change the value depending on if the permutation is accessible through concatenation or is equal to our current state of construction.
Step 1: current string $1$, permutation values:
$123 - \frac{1}{3}$
$132 - \frac{1}{3}$
$213 - 0$
$231 - 0$
$312 - 0$
$321 - 0$
each step we take the highest non 3/3 sequence and choose the digit to raise it . always attempt to go from 2/3 t to 3/3 or from 1/3 to 2/3. Checking in that order
Step 2: current string $12$, permutation values:
$123 - \frac{2}{3}$
$132 - 0$
$213 - \frac{1}{3}$
$231 - \frac{1}{3}$
$312 - 0$
$321 - 0$
Step 3: current string $123$, permutation values:
$123 - \frac{3}{3}=1$
$132 - 0$
$213 - 0$
$231 - \frac{2}{3}$
$312 - \frac{1}{3}$
$321 - \frac{1}{3}$
Step 4: current string $1231$, permutation values:
$123 - \frac{3}{3}$
$132 - \frac{1}{3}$
$213 - 0$
$231 - \frac{3}{3}$
$312 - \frac{2}{3}$
$321 - 0$
Step 5: current string $12312$, permutation values:
$123 - \frac{3}{3}$
$132 - 0$
$213 - \frac{1}{3}$
$231 - \frac{3}{3}$
$312 - \frac{3}{3}$
$321 - 0$
Step 6: current string $123121$, permutation values:
$123 - \frac{3}{3}$
$132 - \frac{1}{3}$
$213 - \frac{2}{3}$
$231 - \frac{3}{3}$
$312 - \frac{3}{3}$
$321 - 0$
Step 7: current string $1231213$, permutation values:
$123-\frac{3}{3}$
$132 -\frac{2}{3}$
$213 -\frac{3}{3}$
$231 - \frac{3}{3}$
$312 - \frac{3}{3}$
$321 - \frac{1}{3}$
step 8 current string $12312132$, permutation values:
$123 - \frac{3}{3}$
$132 - \frac{3}{3}$
$213 - \frac{3}{3}$
$231 - \frac{3}{3}$
$312 - \frac{3}{3}$
$321 - \frac{2}{3}$
step 9 current string $123121321$, permutation values:
$123 - \frac{3}{3}$
$132 - \frac{3}{3}$
$213 - \frac{3}{3}$
$231 - \frac{3}{3}$
$312 - \frac{3}{3}$
$321 - \frac{3}{3}$
Final string
$123121321$
At each step we take the highest non 3/3 sequence and choose the digit to raise it .