#include<iostream>
#include <string>
#include <stdlib.h>
using namespace std;
int main()
{
int n;
int ouputNum;
char str[50];
char ch;
char output[50];
string line;
cin>>line;
n= line[0];
for(int i = 2; i<line.size(); i++)
{
str[i] = line.at(i);
}
for (int i =2; i<line.size();)
{
int j = i+1;
if (j < line.size())
{
while( j< line.size() && str[i] == str[j])
{
j++;
}
cout<<str[i];
i = j;
}
else
{
cout<<str[i];
i++;
}
}
cout<<endl;
system("pause");
return 0;
}