#include <iostream>
#include <cstdlib>
#include <cstring>
#include <string>
using namespace std;
int main() {
	int len1[500] = { 0 };
	char str1[500]{};//zero init 
	char str2[500]{};//zero init
	char str3[500]{};//zero init
	int i = 0;
	int j = 0;
	int len = 0;
	int string_counter = 0;
	int len_counter = 0;
	int temp = 0;
	int max_index = 0;
	int x = 0;
	string str_arr[10] = {};
	cin.getline(str1, 500);
	while (str1[j] != '\0') {
		if (str1[j] != ' ' && str1[j] != '.') {// skip '.' and ' '
 
			str2[len_counter] = str1[j]; //copy str1 each word to str2
			len_counter++;
			j++;
		}
		else {
			len1[len] = len_counter; //record each word lenth
			str_arr[string_counter] = str2;
 
			memset(str2, 0, sizeof(str2));  // clear temporary str2
			len_counter = 0;
			string_counter++;
			len++;
			j++;
		}
 
	}
	for (int a = 0; a < 10; a++) {
		//cout << len1[a];
	}
	while (len1[x] != 0) {
		if (len1[x]> temp) {
			temp = len1[x];
			max_index = x;
 
		}
		x++;
 
	}
    //don't need it
	//str_arr[max_index] += '\0';
    cout << str_arr[max_index];
 
 
 
 
	return 0;
}