#include<bits/stdc++.h>
#define MAXSYMB 100000
using namespace std;
string s;
int a[4], n, x = MAXSYMB, y = MAXSYMB, xB, yB;/// U = 0 ; D = 1 ; R = 2 ; L = 3
void broene(){
    for(int i = 0; i < n; i++){
        switch(s[i]){
        case 'U':
            a[0] ++;
            break;
        case 'D':
            a[1] ++;
            break;
        case 'R':
            a[2] ++;
            break;
        case 'L':
            a[3] ++;
        }
    }
}
int main(){
    cin >> s;
    n = s.size();
    broene();
    xB = x + a[2] - a[3];
    yB = y + a[1] - a[0];
    int difY, difX;
    difY = max(yB,y) - min(yB,y);
    difX = max(xB,x) - min(xB,x);
    if(yB < y){
        for(int i = 0; i < difY; i++){
            cout << "D";
        }
    }else if(yB > y){
        for(int i = 0; i < difY; i++){
            cout << "U";
        }
    }
    if(xB < x){
        for(int i = 0; i < difX; i++){
            cout << "R";
        }
    }else if(xB > x){
        for(int i = 0; i < difX; i++){
            cout << "L";
        }
    }else if(xB == x and yB == y){
         cout << "0";
    }
    cout << endl;
    return 0;
}
