
//#include "pch.h"
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
void onlyOne( vector<string> vs, vector<int> &v, vector<int> &rev, char sCh, int sNum)
{
// 处理具有唯一字符的单词
int cNum; // 数字数量
int pos;
pos = sCh - 'a';
cNum = v[pos];
if ( cNum > 0 ) {
for ( auto ch : vs[sNum] )
v[ch - 'a'] -= cNum;
while ( cNum > 0 ) {
rev.push_back(sNum);
cNum--;
}
}
}
int main(void)
{
/*
1 one
2 two
3 three
4 four
5 five
6 six
7 seven
8 eight
9 nine
*/
vector<int> v( 26, 0);
string gs;
cin >> gs;
if ( gs.size() == 0 )
return 0;
for ( auto a : gs ) {
if ( a >= 'A' && a <= 'Z' )
++(v[a-'A']);
else if ( a >= 'a' && a <= 'z' )
++(v[a-'a']);
}
/*
a b c d e f g h i j k l m n o p q r s t u v w x y z
0 0 0 0 8 2 1 2 4 0 0 0 0 4 3 0 0 2 2 3 1 2 1 1 0 1
a b c d e f g h i j k l m n o p q r s t u v w x y z
0 0 0 0 8 2 1 2 4 0 0 0 0 4 3 0 0 2 2 3 1 2 1 1 0 0
a b c d e f g h i j k l m n o p q r s t u v w x y z
0 0 0 0 7 1 0 1 2 0 0 0 0 4 1 0 0 1 1 1 0 2 0 0 0 0
a b c d e f g h i j k l m n o p q r s t u v w x y z
0 0 0 0 1 0 0 0 1 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0
a b c d e f g h i j k l m n o p q r s t u v w x y z
0 0 0 0 1 0 0 0 1 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0
*/
vector<string> vs(10);
vs[0] = "zero"; // z0 0-
vs[1] = "one"; // o1 -
vs[2] = "two"; // w0
vs[3] = "three"; // r3 -
vs[4] = "four"; // u0
vs[5] = "five"; // f5 -
vs[6] = "six"; // x0
vs[7] = "seven"; // s7 -
vs[8] = "eight"; // g0
vs[9] = "nine"; // e9
// 统计各字符个数
vector<int> v26( 26, 0);
for ( size_t i = 0; i < vs.size(); i++ ) {
string &temp = vs[i];
for ( auto ch : temp)
++(v26[ch-'a']);
}
vector<int> rev;
// 处理具有唯一字符的单词
// 0
onlyOne(vs, v, rev, 'z', 0); // w2
// 1
onlyOne( vs, v, rev, 'w', 2); // w2
onlyOne( vs, v, rev, 'u', 4); // u4
onlyOne( vs, v, rev, 'x', 6); // x6
onlyOne( vs, v, rev, 'g', 8); // g8
// 2
onlyOne(vs, v, rev, 'f', 5); // f5
onlyOne(vs, v, rev, 'o', 1); // o1
onlyOne(vs, v, rev, 'r', 3); // r3
onlyOne(vs, v, rev, 's', 7); // s7
// 3
onlyOne(vs, v, rev, 'e', 9); // e9
sort(rev.begin(),rev.end());
for ( auto i : rev )
cout << i;
cout << endl;
return 0;
}