Let's be given a safe that is secured by a code of length $n$ generated by using symbols from an alphabet of length $m$.
Now a continuous stream of symbols may be entered in order to open the safe. As soon as the correct code becomes a subsequence of stream thus far entered, the safe opens.
Given $n$ and $m$, what is the shortest code that opens the safe, that is guaranteed to open for any correct code?
For example, if one wants to test the codes AAA and AAB it is enough to simply try AAAB as both AAA and AAB are subsequences of AAAB.