#include<iostream>
using namespace std;

int main()
{
    string posoka;
    int up_down=0, left_right=0, br=0;
    cin>>posoka;
    do
    {
        if(posoka[br]=='L')
        {
            left_right++;
        }
        else
        {
            if(posoka[br]=='R')
            {
                left_right--;
            }
            else
            {
                if(posoka[br]=='U')
                {
                    up_down++;
                }
                else
                {
                    up_down--;
                }
            }
        }
        br++;
    }while(posoka[br]!='\0');
    if(left_right==0 && up_down==0)
    {
        cout<<"0";
    }
    else
    {
        if(up_down>=0)
        {
            for(int i=0;i<up_down;i++)
            {
                cout<<"D";
            }
        }
        else
        {
            for(int i=0;i>up_down;i--)
            {
                cout<<"U";
            }
        }
        if(left_right>=0)
        {
            for(int i=0;i<left_right;i++)
            {
                cout<<"R";
            }
        }
        else
        {
            for(int i=0;i>left_right;i--)
            {
                cout<<"L";
            }
        }
    }
    cout<<endl;
    return 0;
}