#include <bits/stdc++.h>
using namespace std;
/*  
- Our collaboration has been a thing of beauty.
- And for those who fear Allah , He will make their path easy. 
*/
bool isUpper(char c)
{
   return (c>=65 && c<97);
}
int main()
{
  string s;
  getline(cin,s);
  int len = s.length();
  if(isUpper(s[0]))
   cout<<s[0];
  for(int i =1 ;i<len;++i)
  {
   
    if(isUpper(s[i])&& s[i-1]==' ')
              cout<<s[i];
       
  }
  
}