#include<iostream>
#include<cstring>
using namespace std;
int main ()
{
    char nizche[1000],to_do;
    long long in, brBukvi=0;
    cin>>nizche>>to_do;
    for(in=0;nizche[in]!='\0'; in++) brBukvi++;
    for(in=0; in<brBukvi; in++){
        cout<<nizche[in];
        if(nizche[in]=='a'||nizche[in]=='A'||nizche[in]=='e'||nizche[in]=='E'||nizche[in]=='I'||nizche[in]=='i'||nizche[in]=='O'||nizche[in]=='o'
           ||nizche[in]=='u'||nizche[in]=='U'||nizche[in]=='y'||nizche[in]=='Y'){
                if(to_do=='c')
                cout<<"f"<<nizche[in];
                else{
                    in+=2;
                }
           }
    }
    return 0;
}
