<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 {
public:
    string originalDigits(string s) {
        map<char,int> m;
        for(auto it: s){
            m[it]++;
        }
        vector<pair<char,pair<string,int>>> v={{'z',{"zero",0}},{'x',{"six",6}},{'s',{"seven",7}},{'w',{"two",2}},{'u',{"four",4}},{'o',{"one",1}},{'r',{"three",3}},{'f',{"five",5}},{'h',{"eight",8}},{'n',{"nine",9}}};
        string ans="";
        int i=0;
        while(i<10){
            char ch=v[i].first;
            if(m[ch]==0){
                i++;
                continue;
            }
            string str=v[i].second.first;
            int num=v[i].second.second;
            for(int j=0;j<str.length();j++){
                m[str[j]]--;
            }
            ans+=(to_string(num));
        }
        vector<int> vec(10,0);
        for(auto it: ans){
            vec[it-'0']++;
        }
        ans="";
        i=0;
        for(i=0;i<10;i++){
            if(vec[i]==0){
                continue;
            }
            while(vec[i]!=0){
                ans+=(to_string(i));
                vec[i]--;
            }
        }
        return ans;

    }
};
13700