#include<iostream>
using namespace std;
int main (){
    int nalqvo=0;
    int nagore=0;
    string a;
    cin>>a;
    for(int i = 0 ; i < a.size();i++){
        if(a[i]=='L'){
            nalqvo--;
        }if(a[i]=='R'){
            nalqvo++;
        }if(a[i]=='U'){
            nagore++;
        }if(a[i]=='D'){
            nagore--;
        }

    }
    bool fl=false;
        while(nagore>0){
            cout<<"D";
            nagore--;
            fl=true;
        }
        while(nagore<0){
            cout<<"U";
            nagore++;
            fl=true;

        }
        while(nalqvo<0){
            cout<<"R";
            nalqvo++;
            fl=true;
        }while(nalqvo>0){
            cout<<"L";
            nalqvo--;
            fl=true;
        }
        if(!fl){
            cout<<0;
        }
        cout<<"\n";
    return 0;
}
