#include<bits/stdc++.h>
using namespace std;

int main(){

int up=0,right=0;
char sym;
string dir;
cin>>dir;
for(int i=0;i<dir.size();i++){
    if(dir[i]=='U'){up--;continue;}
    if(dir[i]=='D'){up++;continue;}
    if(dir[i]=='R'){right--;continue;}
    if(dir[i]=='L'){right++;continue;}
    break;
}

if(up==0&&right==0)cout<<0<<endl;
else{
    /// Up Down
    if(up>=0)sym='U';
    else{sym='D';up*=-1;}
    for(int i=0;i<up;i++)cout<<sym;
    /// Right Left
    if(right>=0)sym='R';
    else{sym='L';right*=-1;}
    for(int i=0;i<right;i++)cout<<sym;
    cout<<endl;
}

return 0;
}
