#include <iostream>
#include <sstream>
using namespace std;
int main()
{
string s, w, word;
getline(cin, s);
int max = 0;
stringstream ssin(s);
while(ssin >> w)
{
int len = w.size();
if(w[len - 1] == '.') w = w.substr(0, len - 1), len--;
if(max < len) max = len, word = w;
}
cout << word;
return 0;
}