<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:
        C = Counter([ch for ch in s])
        res = ''

        for ch in ('zwuxg'):
            if ch in C:
                v = C[ch]
                if ch == 'z':
                    res += '0' * v
                    C['z'] -= v
                    C['e'] -= v
                    C['r'] -= v
                    C['o'] -= v
                if ch == 'w':
                    res += '2' * v
                    C['t'] -= v
                    C['w'] -= v
                    C['o'] -= v
                if ch == 'u':
                    res += '4' * v
                    C['f'] -= v
                    C['o'] -= v
                    C['u'] -= v
                    C['r'] -= v
                if ch == 'x':
                    res += '6' * v
                    C['s'] -= v
                    C['i'] -= v
                    C['x'] -= v
                if ch == 'g':
                    res += '8' * v
                    C['e'] -= v
                    C['i'] -= v
                    C['g'] -= v
                    C['h'] -= v
                    C['t'] -= v
        
        
        for ch in ('fsiro'):
            if ch in C:
                v = C[ch]
                if ch == 'f':
                    res += '5' * v
                    C['f'] -= v
                    C['i'] -= v
                    C['v'] -= v
                    C['e'] -= v
                if ch == 's':
                    res += '7' * v
                    C['s'] -= v
                    C['e'] -= v
                    C['v'] -= v
                    C['e'] -= v
                    C['n'] -= v
                if ch == 'i':
                    res += '9' * v
                    C['n'] -= v
                    C['i'] -= v
                    C['n'] -= v
                    C['e'] -= v
                if ch == 'r':
                    res += '3' * v
                    C['t'] -= v
                    C['h'] -= v
                    C['r'] -= v
                    C['e'] -= v
                    C['e'] -= v
                if ch == 'o':
                    res += '1' * v
                    C['o'] -= v
                    C['n'] -= v
                    C['e'] -= v
        return ''.join(sorted(res))
17500