int main()
{
  char x[100]; //x????????? 
  int i=0,spot; //i?????? spot???? 
  cin.getline(x,100,'\n'); //???????,???????? 
  while(x[i]!=0) //?????\0? ?? 
  {
                       if(x[i]==' '&&x[i+1]==' ')  //??????????????? 
                       {
                                  spot=i; //spot?????? 
                                  while(x[i+1]!=0)
                                  {
                                               x[i+1]=x[i+2];
                                               i++;
                                  };  //???i???????????? ??while?? ????????\0?? 
                                  i=spot-1; //????????????? (??if??i++) 
                       }
                       i++;   //???????       
  };
  i=0;
  while(x[i]!=0)
  {
        cout<<x[i];
        i++;        
  } //?x[i]??\0??? 
 
  return 0;
}