#include <iostream> #include <cstdio> #include <string> using namespace std; int main() { string str; while (getline(cin, str)) { if (str.size() > 1) { if (str[0] >= 'a' && str[0] <= 'z') { str[0] = str[0] - 'a' + 'A'; } for (int i = 1; i < str.size(); ++i) { if (str[i] >= 'a' && str[i] <= 'z' && (str[i - 1] == ' ' || str[i - 1] == '\t' || str[i - 1] == '\r' || str[i - 1] == '\n')) { str[i] = str[i] - 'a' + 'A'; } } } else { str[0] = str[0] - 'a' + 'A'; } cout << str.substr(0,str.size()) << endl; } return 0; }