#include <iostream>
#include <string>
#include <sstream>
#include <cctype>
int main(){
std::string buf;
while ( true ){
std::cout << "String: ";
std::getline(std::cin, buf);
if ( buf.empty() )
break;
std::istringstream ist(buf);
std::ostringstream ost;
while ( ist >> buf ){
*buf.begin() = toupper(*buf.begin());
ost << buf << ' ';
}
std::cout << "Result: " << ost.str() << std::endl;
}
return 0;
}