#include <iostream>

using namespace std;

int X = 0;
int Y = 0;

int main()
{
    char A;

    while (cin >> A)
    {
        switch (A)
        {
        case 'U':
            Y--;
            break;
        case 'D':
            Y++;
            break;
        case 'L':
            X--;
            break;
        case 'R':
            X++;
            break;
        }
    }

    if (X == 0 && Y == 0)
    {
        cout << "0";
        return 0;
    }

    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++;
        }
    }
}
