#include <iostream>
#include <string>

using namespace std;

int main () {
    string mov, out = "";
    int a[2] = {0, 0};
    cin >> mov;
    if ( mov.size() < 1 || mov.size() > 100000) return 0;
    for ( int i = 0; i < mov.size(); i ++ ) {
        string current = "";
        current += mov[i];
        if ( current == "L" || current == "R") a[0] += (current == "L") ? -1 : 1;
        else if ( current == "U" || current == "D") a[1] += (current == "U") ? -1 : 1;
    }
    if (a[0] == 0 && a[1] == 0) cout << 0 << endl;
    else {
        for ( int y = 0; y < abs(a[1]); y ++ ) {
            out += (a[1] < 0) ? "D" : "U";
            a[1] += (a[1] < 0) ? 1 : -1;
        }
        for ( int x = 0; x < abs(a[0]); x ++ ) {
            out += (a[0] < 0) ? "R" : "L";
            a[0] += (a[0] < 0) ? 1 : -1;
        }
        cout << out << endl;
    }


    return 0;
}
