#include<iostream>
#include<stdio.h>
#include<string>
#include<set>
using namespace std; int main()
{
//freopen("acm.acm","r",stdin);
set<char> coll[]; coll[].insert('B');
coll[].insert('F');
coll[].insert('P');
coll[].insert('V'); coll[].insert('C');
coll[].insert('G');
coll[].insert('J');
coll[].insert('K');
coll[].insert('Q');
coll[].insert('S');
coll[].insert('X');
coll[].insert('Z'); coll[].insert('D');
coll[].insert('T'); coll[].insert('L'); coll[].insert('M');
coll[].insert('N'); coll[].insert('R');
int i;
int j;
int tem;
string s;
//set<char>::iterator pos;
while(cin>>s)
{
tem = -;
for(i = ; i < s.length(); ++i)
{
for(j = ; j <= ; ++j)
{
if(coll[j].find(s[i]) != coll[j].end())
{
if(tem != j)
{
cout<<j;
tem = j;
}
break;
} }
if(j == )
tem = -;
}
cout<<endl;
} }