<p>Given a string <code>s</code> containing an out-of-order English representation of digits <code>0-9</code>, return <em>the digits in <strong>ascending</strong> order</em>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<pre><strong>Input:</strong> s = "owoztneoer"
<strong>Output:</strong> "012"
</pre><p><strong class="example">Example 2:</strong></p>
<pre><strong>Input:</strong> s = "fviefuro"
<strong>Output:</strong> "45"
</pre>
<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= s.length &lt;= 10<sup>5</sup></code></li>
	<li><code>s[i]</code> is one of the characters <code>[&quot;e&quot;,&quot;g&quot;,&quot;f&quot;,&quot;i&quot;,&quot;h&quot;,&quot;o&quot;,&quot;n&quot;,&quot;s&quot;,&quot;r&quot;,&quot;u&quot;,&quot;t&quot;,&quot;w&quot;,&quot;v&quot;,&quot;x&quot;,&quot;z&quot;]</code>.</li>
	<li><code>s</code> is <strong>guaranteed</strong> to be valid.</li>
</ul>

class Solution:
    def originalDigits(self, s: str) -> str:
        d = Counter(s)
        ans = []
        heapq.heapify(ans)
        while d.get('z',0)>0:
            d['z'] -= 1
            d['e'] -= 1
            d['r'] -= 1
            d['o'] -= 1
            heapq.heappush(ans,0)
        while d.get('w',0)>0:
            d['w'] -= 1
            d['t'] -= 1
            d['o'] -= 1
            heapq.heappush(ans,2)
        while d.get('u',0)>0:
            d['f'] -= 1
            d['o'] -= 1
            d['u'] -= 1
            d['r'] -= 1
            heapq.heappush(ans,4)
        while d.get('x',0)>0:
            d['s'] -= 1
            d['i'] -= 1
            d['x'] -= 1
            heapq.heappush(ans,6)
        while d.get('g',0)>0:
            d['e'] -= 1
            d['i'] -= 1
            d['g'] -= 1
            d['h'] -= 1
            d['t'] -= 1
            heapq.heappush(ans,8)
        while d.get('o',0)>0:
            d['n'] -= 1
            d['o'] -= 1
            d['e'] -= 1
            heapq.heappush(ans,1)
        while d.get('h',0)>0:
            d['t'] -= 1
            d['h'] -= 1
            d['r'] -= 1
            d['e'] -= 1
            d['e'] -= 1
            heapq.heappush(ans,3)
        while d.get('f',0)>0:
            d['f'] -= 1
            d['i'] -= 1
            d['v'] -= 1
            d['e'] -= 1
            heapq.heappush(ans,5)
        while d.get('s',0)>0:
            d['s'] -= 1
            d['e'] -= 1
            d['v'] -= 1
            d['e'] -= 1
            d['n'] -= 1
            heapq.heappush(ans,7)
        while d.get('n',0)>0:
            d['n'] -= 1
            d['i'] -= 1
            d['n'] -= 1
            d['e'] -= 1
            heapq.heappush(ans,9)
        t = ""
        while ans:
            t += str(heapq.heappop(ans))
        return t
17400