#include <iostream>
using namespace std;
int main()
{
string res, str;
while (cin >> str)
{
if (str.back() == '.') str.pop_back(); //str.back 是字符串最后一个字符
if (str.size() > res.size()) res = str; //str.pop_back 删除最后一个字符
}
cout << res << endl;
return 0;