#include <iostream>
#include <string>
using namespace std;
int X = 0;
int Y = 0;
int main()
{
    string A;
    cin >> A;
    for (int i = 0; i < A.length(); i++)
    {
        switch (A[i])
        {
        case 'U':
            Y--;
            break;
        case 'D':
            Y++;
            break;
        case 'L':
            X--;
            break;
        case 'R':
            X++;
            break;
        }
    }
    while (Y != 0)
    {
        if (Y > 0)
        {
            cout << "U";
            Y--;
        }
        else
        {
            cout << "D";
            Y++;
        }
    }
    while (X != 0)
    {
        if (X > 0)
        {
            cout << "L";
            X--;
        }
        else
        {
            cout << "R";
            X++;
        }
    }
}