<p>You are given a string <code>s</code> and a robot that currently holds an empty string <code>t</code>. Apply one of the following operations until <code>s</code> and <code>t</code><strong>are both empty</strong>:</p>
<ul>
<li>Remove the <strong>first</strong> character of a string <code>s</code> and give it to the robot. The robot will append this character to the string <code>t</code>.</li>
<li>Remove the <strong>last</strong> character of a string <code>t</code> and give it to the robot. The robot will write this character on paper.</li>
</ul>
<p>Return <em>the lexicographically smallest string that can be written on the paper.</em></p>
<p> </p>
<p><strongclass="example">Example 1:</strong></p>
<pre>
<strong>Input:</strong> s = "zza"
<strong>Output:</strong>"azz"
<strong>Explanation:</strong> Let p denote the written string.