/**
 * Mnogo lesna, reshih q ot purvi submit.
 * V pravougulna mreja dali minavash po zig-zag ili s dve pravi otsechki nqma znachenie:
 * ............... ...............
 * ..@-+.......... ..@............
 * ....+--|....... ..|............
 * .......+--@.... ..+-------@....
 * ............... ...............
 *  put: 9          put: 9
**/
#include <bits/stdc++.h>
using namespace std;
int main(){
    cin.sync_with_stdio(0);
    cin.tie(nullptr);
    string s;
    cin >> s;
    int bx = 0, by = 0;
    for(int i = 0; i < s.length(); i++){
        switch(s[i]){
            case 'L':bx--;break;
            case 'R':bx++;break;
            case 'U':by++;break;
            case 'D':by--;break;
        }
    }

    if(bx == 0 && by == 0){cout << "0"; return 0;}

    char vert_char = 'D';
    if(by < 0){vert_char = 'U';}
    by = abs(by);
    for(int i = 0; i < by; i++){
        cout << vert_char;
    }

    char horiz_char = 'L';
    if(bx < 0){horiz_char = 'R';}
    bx = abs(bx);
    for(int i = 0; i < bx; i++){
        cout << horiz_char;
    }
}
