#include <iostream>
#include<string>
using namespace std;

int main() {
    string s;
    getline(cin,s);
    bool isfirst = true;
    for(char &c :s){
      if( c ==' '){
        isfirst = true;
      }else{
        if(isfirst){
            if(c>='a' && c<='z'){
                c=c-'a'+'A';
            }
            cout <<c;
            isfirst = false;
        }
      }
    }
}

getline 获取带空格的整行