#include<iostream>
#include<string>
#include<math.h>
using namespace std;
void print(char chr,int number){
    for(int i=0;i<number;i++){
        cout<<chr;
    }
}
string arr;
int main(){
    int right=0;
    int left=0;
    int up=0;
    int down=0;
    cin>>arr;
    int len=arr.length();
    for(int i=0;i<len;i++){
        if(arr[i]=='R'){
            right++;
        }
        if(arr[i]=='L'){
            left++;
        }
        if(arr[i]=='D'){
            down++;
        }
        if(arr[i]=='U'){
            up++;
        }
    }
    int total_right=right-left;
    int total_up=up-down;
    if(total_right==0 && total_up==0){
        cout<<"0"<<endl;
        return 0;
    }
    if(total_up>0){
        print('D',total_up);
    }else{
        print('U',(total_up*(-1)));
    }
    if(total_right>0){
        print('L',total_right);
    }else{
        print('R',(total_right*(-1)));
    }
    cout<<endl;
}

