#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i ) #define rep(i,n) REP(i,0,n) using ll = long long; constexpr int inf=1e9+7; constexpr ll longinf=1LL<<60 ; constexpr ll mod=1e9+7 ; vector square; pair get(int n){ if(n == 1)return {0, 0}; int idx = lower_bound(square.begin(),square.end(),n)-square.begin(); int len = (square[idx]-square[idx-1])/4; n -= square[idx-1]; if(n<=len){ return {idx, -idx+n}; } else if(n<=2*len){ return {idx-(n-len),idx}; } else if(n<=3*len){ return {-idx, idx-(n-2*len)}; } else { return {-idx+(n-3*len),-idx}; } } string root(vector ansx, vector ansy){ string res = ""; int n=ansx.size(); rep(i,n-1){ if(ansx[i]ansx[i+1])res+='L'; if(ansy[i]ansy[i+1])res+='D'; } return res; } int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int v = 1; while(v*v<=2*inf){ square.push_back(v*v); v+=2; } int s, t; cin>>s>>t; auto st = get(s), en = get(t); int sx = st.first, sy = st.second; int ex = en.first, ey = en.second; int dist = abs(ex-sx)+abs(ey-sy); if(dist%2 == 1){ int cx = sx, cy = sy; vector xs, ys; xs.push_back(cx); ys.push_back(cy); while(cx!=ex||cy!=ey){ if(cx!=ex){ if(cx ansx, ansy; int n = xs.size()/2; rep(i,n){ rep(j,2){ ansx.push_back(xs[2*i]);ansy.push_back(ys[2*i]); ansx.push_back(xs[2*i+1]);ansy.push_back(ys[2*i+1]); } } string ans = root(ansx, ansy); cout<<0< ansx, ansy; { int cx = sx, cy = sy; vector xs, ys; xs.push_back(cx); ys.push_back(cy); int tx = 0, ty = 1; while(cx!=tx||cy!=ty){ if(cx!=tx){ if(cx xs, ys; xs.push_back(cx); ys.push_back(cy); while(cx!=ex||cy!=ey){ if(cx!=ex){ if(cx ansx, ansy; { int cx = sx, cy = sy; vector xs, ys; xs.push_back(cx); ys.push_back(cy); int tx = 1, ty = 1; while(cx!=tx||cy!=ty){ if(cx!=tx){ if(cx xs, ys; xs.push_back(cx); ys.push_back(cy); while(cx!=ex||cy!=ey){ if(cx!=ex){ if(cx