# include<iostream>
using namespace std;
int main() {
    string s;
    while (getline(cin, s)) {

        for (int i = 0; i < s.length(); i++) {
            if (i == 0) {
                if (s[i] >= 'a' && s[i] <= 'z')
                    s[i] = s[i] - 32;
            } else if (s[i] >= 'a' && s[i] <= 'z') {
                if (s[i - 1] == ' ' || s[i - 1] == '\r' || s[i - 1] == '\n' || s[i - 1] == '\t')
                    s[i] = s[i] - 32;
            } else
                continue;
        }


        cout << s << endl;

    }





}