#include<bits/stdc++.h>
using namespace std;
int main()
{
char s[110],a[10];
int n=0,i;
gets(s);
if(s[0]!=' '){
if(s[0]>='a'){
s[0]-=' ';
}
a[n]=s[0];
n++;
}
for(i=1;i<strlen(s);i++){
if(s[i]!=' '&&s[i-1]==' '){
if(s[i]>=97)
s[i]-=' ';
a[n]=s[i];
n++;
}
}
for(i=0;i<n;i++){
cout<<a[i];
}
return 0;
}
/**************************************************************
Problem: 1100
User: zzz
Language: C++
Result: Accepted
Time:21 ms
Memory:2076 kb
****************************************************************/