#include <stdio.h>

int main() {
    char arr[100000] = {0};
    gets(arr);
    int i = 0;
    while (arr[i] != '\0')
    {
        if (i == 0)
        {
            if (arr[i] >= 'a' && arr[i] <= 'z')
            {
                printf("%c",arr[i] -32);
            }
            else 
            {
                printf("%c",arr[i]);
            }
        }
        if (arr[i-1] == ' ')
        {
            if (arr[i] >= 'a' && arr[i] <= 'z')
            {
                printf("%c",arr[i] -32);
            }
            else 
            {
                printf("%c",arr[i]);
            }
        }

        i++;
    }
    return 0;
}