#include<bits/stdc++.h>
using namespace std;
int main()
{
	char s[110],i,q,o[11],j=0;
	gets(s);
	q=strlen(s);
	for(i=0;i<q;i++){
		if(i==0&&s[i]!=' '){
			j=s[i];
			if(j>='a'&&j<='z')
				cout<<char(j-32);
			else
				cout<<j;
		}
		else if(i>0&&s[i]!=' '&&s[i-1]==' '){
			j=s[i];
			if(s[i]>='a'&&s[i]<='z'){
				cout<<char(j-32);
			}
			else
				cout<<j;
		}
	}
	return 0;
}
/**************************************************************
	Problem: 1100
	User: houshanglin
	Language: C++
	Result: Accepted
	Time:17 ms
	Memory:2076 kb
****************************************************************/