#include<iostream>
using namespace std;
int main()
{
string word[500];
int i=0;
int length[500]={0};
while(1)
{
cin>>word[i];
length[i]=word[i].length();
if(word[i][length[i]-1]=='.')//读入到以.结尾的单词,结束循环
{
word[i].erase(length[i]-1,1);//删去末尾的.
length[i]--;
break;
}
i++;
}
int max=0;
string mas;
int m=0;
while(length[m])//寻找最长的单词
{
if(length[m]>max)
{
max=length[m];
mas=word[m];
}
m++;
}
cout<<mas;
return 0;
}