#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main() {
    int a;
    int next_upper = 1;
    while ((a = getchar()) != '\n') { 
        if (next_upper)
            printf("%c", toupper(a));
            next_upper = 0;
        if (a == ' ')
            next_upper = 1;
    }
    return 0;
}