#include <fstream>
#include <iostream>
#include <cstdlib>
#include <cctype>
using namespace std;
int main()
{
// using std::cin for this demo
//     ifstream in_data("test.txt");
//     if (!in_data)
//     {
//         cout << "Input file opening failed.\n";
//         return 1;
//     }
     char next_symbol;
     int count = 0;
     while( /*in_data*/ cin.get(next_symbol) )
     {
         if (islower(next_symbol))
         {
             next_symbol = toupper(next_symbol);
         }
         if (next_symbol == ' ')
         {
             count++;
         }
         else
         {
             if (count>0)
             {
                 cout << " ";
             }
             count=0;
             cout << next_symbol;
         }
     }
     cout << endl;
}