#include<bits/stdc++.h>
using namespace std;
int main ()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    string s;
    cin>>s;
    long long U=0, D=0, L=0, R=0;
    string a;
    for(long long i=0;i<s.size();i++)
    {
        if(s[i]=='L')L++;
        if(s[i]=='U')U++;
        if(s[i]=='D')D++;
        if(s[i]=='R')R++;
    }
    if(U==D && R==L)cout<<"0"<<endl;
    else{
        if(U>D){
        while(U>D)
            {
                a.push_back('D');
                U--;
            }
        }
        if(U<D){
            while(U<D)
            {
                a.push_back('U');
                D--;
            }
        }
        if(R>L){
            while(R>L)
            {
                a.push_back('L');
                R--;
            }
        }
        if(L>R){
            while(L>R)
            {
                a.push_back('R');
                L--;
            }
        }
        cout<<a<<endl;
    }
    
    return 0;
}
