#include<iostream>
#include<cstring>
using namespace std;
int main ()
{
    char vhod[100001];
    cin>>vhod;
    int row_b=100001, column_b=100001, row_e=100001, column_e=100001;
    for(int i=0; i<strlen(vhod); i++)
    {
        if(vhod[i]=='L')
        {
            column_e--;
        }
        else
        {
            if(vhod[i]=='R')
            {
                column_e++;
            }
            else
            {
                if(vhod[i]=='U')
                {
                    row_e--;
                }
                else
                {
                    row_e++;
                }
            }
        }
    }
    if(row_b==row_e && column_b==column_e)
    {
        cout<<"0";
    }
    else
    {
        if(row_e<row_b)
        {
            while(row_b!=row_e)
            {
                row_e++;
                cout<<"D";
            }
        }
        else
        {
            while(row_e!=row_b)
            {
                row_b++;
                cout<<"U";
            }
        }
        if(column_b>column_e)
        {
            while(column_b!=column_e)
            {
                column_e++;
                cout<<"R";
            }
        }
        else
        {
            while(column_e!=column_b)
            {
                column_b++;
                cout<<"L";
            }
        }
    }
    cout<<endl;
    return 0;
}
