#include <bits/stdc++.h>

using namespace std;

int main() {
    string scent;

    while (getline(cin, scent)) {
        scent = ' ' + scent;
        for (int i = 1; i < scent.size(); ++i) {
            if ('a' <= scent[i] && 'z' >= scent[i] && (' ' == scent[i - 1] || '\t' == scent[i - 1]) ||
                '\r' == scent[i - 1] || '\n' == scent[i - 1]) {
                scent[i] -= 32;
            }
        }
        printf("%s\n", scent.substr(1, scent.size()).c_str());
    }
    return 0;
}