#include<bits/stdc++.h>
using namespace std;
int main(){
string str;
cin>>str;
int s1=str.size();
if(str[s1-2]=='e' && str[s1-1]=='r'){
s1-=2;
}
if(str[s1-2]=='l' && str[s1-1]=='y'){
s1-=2;
}
if(str[s1-3]=='i' && str[s1-2]=='n' && str[s1-1]=='g'){
s1-=3;
}
for(int i=0;i<=s1-1;i++){
cout<<str[i];
}
return 0;
}