#include<bits/stdc++.h>
#define endl '\n'

using namespace std;

struct Coords {
    int x;
    int y;
};

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

    Coords a;
    a.x = 0;
    a.y = 0;

    Coords b = a;

    string pattern, answer;
    cin >> pattern;

    for (int i = 0; i < pattern.length(); i++) {
        if (pattern[i] == 'R') b.x++;
        if (pattern[i] == 'L') b.x--;
        if (pattern[i] == 'U') b.y++;
        if (pattern[i] == 'D') b.y--;
    }

    //cout << b.x << "   " << b.y << endl;

    if (a.x == b.x && a.y == b.y) {
        cout << 0;
        return 0;
    }

    if (b.y < a.y) {
        while(b.y != a.y) {
            b.y++;
            answer += 'U';
        }
    }
    else if (b.y > a.y) {
        while(b.y != a.y) {
            b.y--;
            answer += 'D';
        }
    }

    if (b.x < a.x) {
        while(b.x != a.x) {
            b.x++;
            answer += 'R';
        }
    }
    else if (b.x > a.x) {
        while(b.x != a.x) {
            b.x--;
            answer += 'L';
        }
    }

    cout << answer;

    return 0;
}
