#include <bits/stdc++.h> using namespace std; bool func(char a) { if(a==' '||a=='\t'||a=='\r'||a=='\n') return true; else return false; } int main() { string words; while(getline(cin,words)) { if(words[0]<'z'&&words[0]>'a') words[0]=words[0]-'a'+'A'; for(int i=1;i<words.size();i++) { if(func(words[i-1])&&words[i]<'z'&&words[i]>'a') { words[i]=words[i]-'a'+'A'; } } cout<<words<<endl; } return 0; }