#include<bits/stdc++.h>
using namespace std;
struct point {
    int x,y;
};
int main() {
    point robot;
    robot.x = 0;
    robot.y = 0;
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    string s;
    cin>>s;
    for(int i=0;i<s.size();i++) {
        if(s[i]=='L') {
            robot.x--;
        }
        if(s[i]=='R') {
            robot.x++;
        }
        if(s[i]=='U') {
            robot.y++;
        }
        if(s[i]=='D') {
            robot.y--;
        }
    }
    //cout<<robot.x<<" "<<robot.y;
    int razX = robot.x
    int razY = robot.y;
    //cout<<razX<<" "<<razY<<endl;
    if(razX==0 && razY==0) {
        cout<<"0\n";
        return 0;
    }
    ///nagore i nadolu

    char symbol;
    if(razY>=0) {
        symbol='D';
    }else {
        symbol='U';
    }
    razY=abs(razY);
    for(int i=0;i<razY;i++) {
        cout<<symbol;
    }


    ///nalqvo i nadqsno


    if(razX>=0) {
        symbol='L';
    }else {
        symbol='R';
    }
    razX=abs(razX);
    for(int i=0;i<razX;i++) {
        cout<<symbol;
    }
    cout<<endl;
    return 0;
}
