#include <iostream>
#include <vector>

using namespace std;


int main()
{
    long long int x;
    int i = 0, p, k, pos;
    short int q;
    cin>>x;
    vector<short int> a;
    while(x > 0)
    {
        a.push_back(x%10);
        x /= 10;
        i++;
    }

    for(int j = 0;j < i; j++ )
    {
        p = 0;
        for(k = j+1; k < i; k++)
        {
            if(a[j] == a[k])
            {
                p++;
                pos = k;
            }
        }
        if(p == 1)
        {
            for(p = j+1;p < pos;p++)
            {
                a[p] = a[j];
            }
            j = pos;
        }

    }
    cout<<u;
}