#include<iostream>
using namespace std;
int main ()
{
    string put;
    long long x=0, y=0, x1=0, y1=0, dolu, gore, levu, desno;
    cin>>put;
    for(long long i=0;i<put.size();i++)
    {
        if(put[i]=='L')
        {
            y1--;
        }
        if(put[i]=='D')
        {
            x1++;
        }
        if(put[i]=='R')
        {
            y1++;
        }
        if(put[i]=='U')
        {
            x1--;
        }
    }
    if(x1>x)
    {
        while(x1>x)
        {
            cout<<"U";
            x1--;
        }
    }
    else
    {
        if(x1<x)
        {
            while(x>x1)
            {
                cout<<"D";
                x--;
            }
        }
    }
    if(y1>y)
    {
        while(y1>y)
        {
            cout<<"L";
            y1--;
        }
    }
    else
    {
        if(y1<y)
        {
            while(y>y1)
            {
                cout<<"R";
                y--;
            }
        }
    }
    return 0;
}
