#include<bits/stdc++.h>
using namespace std;
char a[100001];
char ans[100001];
int now=0;
int main(){
    cin>>a;
    int l=strlen(a);
    if(a[l-2]=='e'&&a[l-1]=='r'){
        for(int i=0;i<l-2;i++)
        cout<<a[i];
    }
    else if(a[l-2]=='l'&&a[l-1]=='y'){
        for(int i=0;i<l-2;i++)
        cout<<a[i];
    }
    else if(a[l-3]=='i'&&a[l-2]=='n'&&a[l-1]=='g'){
        for(int i=0;i<l-3;i++)
        cout<<a[i];
    }
    else{
    	cout<< a;
    }	
    return 0;
}

1 comments

  • 1

Information

ID
6976
Time
1000ms
Memory
256MiB
Difficulty
2
Tags
(None)
# Submissions
54
Accepted
33
Uploaded By