#include<iostream>
#include<string>
using namespace std;
int main(){
string s,box;
cin>>s;
int len=s.length(),j=0;
for(int i=len-2;i<=len;i++){
box[j]=s[i];
j++;
}
if (box=="ing"){
s.erase(len-3,3);
cout<<s<<endl;
return 0;
}
else
j=0;
box="";
for(int i=len-1;i<=len;i++){
box[j]=s[i];
j++;
}
if(box=="ly"||box=="er"){
s.erase(len-2,2);
cout<<s<<endl;
return 0;
}
else
cout<<s<<endl;
return 0;
}