#include <stdio.h>
#include <string>
#include <vector> 
using namespace std;
int main() {
    vector<int> pos;
    char arr[1000];
    fgets(arr, 1000, stdin);
    string str;
    str = arr;
    for (int i = 0; i < str.size(); ++i) {
        if (str[i] == ' ' || str[i] == '\t' || str[i] == '\r' || str[i] == '\n') {
            pos.push_back(i);
        }
    }
    if (str[0] >= 'a' && str[0] <= 'z') {
        str[0] = str[0] - 32;
    }
    for (int i = 0; i < pos.size(); ++i) {
        if (str[pos[i] + 1] >= 'a' && str[pos[i] + 1] <= 'z') {
            str[pos[i] + 1] = str[pos[i] + 1] - 32;
        }
    }
    printf("%s", str.c_str());
}