A safe is protected by a four-digit $(0-9)$ combination. The safe only considers the last four digits entered when deciding whether an input matches the passcode.
For instance, if I enter the stream $012345$, I am trying each of the combinations $0123$, $1234$, and $2345$.
Clearly, a 40000-length string $000000010002...9999$ is guaranteed to crack the safe.
Can we try each of the 10000 combinations using a shorter string? What's the shortest string we can devise to try every combination?