#include<bits/stdc++.h>
using namespace std;
int main(){

    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    string input;
    cin >> input;

    long long l = 0, r = 0, u = 0, d = 0;
    for(long long i = 0; i < input.size(); i++){
        if(input[i] == 'L') l++;
        else if(input[i] == 'R') r++;
        else if(input[i] == 'U') u++;
        else if(input[i] == 'D') d++;
    }

    //cout << u << " " << d;
    if(u > d){
        for(long long i = 0; i < u-d; i++) cout << "D";
    }else if(u < d){
        for(long long i = 0; i < d-u; i++) cout << "U";
    }

    if(l > r){
        for(long long i = 0; i < l-r; i++) cout << "R";
    }else if(r > l){
        for(long long i = 0; i < r-l; i++) cout << "L";
    }

    if(l == r and u == d) cout << 0;


    return 0;
}
