stringstream类
# include <iostream>
# include <cstring>
# include <sstream>
using namespace std;
int main()
{
string s,S,str;
int cnt=0;
getline(cin,s);
s=s.substr(0,s.size()-1);
stringstream ssin(s);
while(ssin>>str)
{
if(str.size()>cnt)
{
cnt=str.size();
S=str;
}
}
cout<<S<<endl;
return 0;
}