#include<bits/stdc++.h>
using namespace std;
int main ()
{
    string s;
    int up=0,right=0;
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cin>>s;
    for(int i=0;i<s.size();i++)
    {
        if(s[i]=='L')right--;
        if(s[i]=='R')right++;
        if(s[i]=='U')up++;
        if(s[i]=='D')up--;
    }
    if(up==0&&right==0)
    {
        cout<<0;
        return 0;
    }
    while(up>0)
    {
        up--;
        cout<<"D";
    }
    while(up<0)
    {
        up++;
        cout<<"U";
    }
    while(right>0)
    {
        right--;
        cout<<"L";
    }
    while(right<0)
    {
        right++;
        cout<<"R";
    }
    return 0;
}
