#include<iostream>
#include<string>
using namespace std;

string word;

int main(){
	while(cin >> word){
		if(word.find(".") != -1 || word.find(",") != -1){
			cout << word.substr(0, word.size() - 1) << endl;
		}
	}
}