#include<iostream>
#include<cstdio>
#include<string>
#include<cstring>
#include<set>
#include<sstream>
using namespace std;
int main()
{
string M;
set<string> S;
getline(cin,M,'.');
istringstream is(M);//自动过滤空格
string t;
string a;
int maxlen=0;
while(is>>t)
{
if(maxlen<t.size())
{
maxlen=t.size();
a=t.substr(0,t.size());
}
}
//cout<<maxlen<<endl;
cout<<a<<endl;
return 0;
}