#include <bits/stdc++.h>

#define endl '\n'

using namespace std;

int main() {
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

    string path; cin >> path;
    pair<int, int> s = {0, 0};
    pair<int, int> e = {0, 0};

    for (char c: path) {
        if (c == 'L') e.second--;
        if (c == 'R') e.second++;
        if (c == 'D') e.first--;
        if (c == 'U') e.first++;
    }

    if (s == e) {
        cout << 0 << endl;
        return 0;
    }

    if (s.first > e.first) {
        cout << string(s.first - e.first, 'U');
    } else {
        cout << string(e.first - s.first, 'D');
    }

    if (s.second > e.second) {
        cout << string(s.second - e.second, 'R');
    } else {
        cout << string(e.second - s.second, 'L');
    }

    cout << endl;

    return 0;
}
