#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
int i,l;
char s[32];
int main(){
scanf("%s",s);
l=strlen(s);
if(strcmp(&s[l-3],"ing")==0)
s[l-3]='\0';
if((strcmp(&s[l-2],"er")==0)||(strcmp(&s[l-2],"ly")==0))
s[l-2]='\0';
puts(s);
return 0;
}