#include <stdio.h>
#include <string.h>
int main() {
    char s[100]={0};
    int i,count;
    while(gets(s)){
        i=0;
        if(s[0]>='a' && s[0]<='z') s[0]-=32;
        while(s[i]!='\0'){
            i++;
            if(s[i]==' ' || s[i]=='\n' || s[i]=='\r' || s[i]=='\t'){
                while(s[i]==' ' || s[i]=='\n' || s[i]=='\r' || s[i]=='\t'){
                    i++;
                }
                if(s[i]>='a' && s[i]<='z') s[i]-=32;
            }
        }
        puts(s);
    }
    return 0;
}