#include <iostream>
#include <string>
using namespace std;

char arr[200];

int main() {
    string str;
    while (fgets(arr, 200, stdin)) {
        str = arr;
        if (str[0] >= 'a' && str[0] <= 'z') {
            str[0] -= 32;
        }
        for (int i = 1; i < str.size(); i++) {
            if (str[i - 1] == ' ' || str[i - 1] == '\t' ||
                    str[i - 1] == '\n' || str[i - 1] == '\r') {
                if (str[i] >= 'a' && str[i] <= 'z') {
                    str[i] -= 32;
                }
            }
        }
        printf("%s\n", str.c_str());
    }

}
// 64 位输出请用 printf("%lld")