#include <stdio.h>
#include <string.h>
void longword(char str[],char word[]){
int len = 0;
int i = 0, j = 0;
while(str[i] != '\0'){
j=i;
while(str[j]!=' '&&str[j]!='\0' ){
j++;
}
len = j-i;
if(len > strlen(word)){
strncpy(word,str+i,len);
}
i=j+1;
}
}
int main(){
char str[256];
gets(str);//scanf遇到空格会中断
char word[256]={0};//用于存储最长的单词
longword(str,word);
printf("%s",word);
return 0;
}