#include using namespace std; using LL=long long; using ULL=unsigned long long; #define rep(i,n) for(int i=0;i<(n);i++) struct Pos{ int x,y; }; Pos id_to_pos(int id){ if(id==1) return {0,0}; id--; for(int i=1;; i++){ int shed=2*i; int off=(shed-1)*(shed-1); int minp=-i+1; if(id-off1){ res+="LLRL"; x.x-=2; } while(x.x<0){ res+="RRLR"; x.x+=2; } while(x.y>1){ res+="DDUD"; x.y-=2; } while(x.y<0){ res+="UUDU"; x.y+=2; } if(x.x==1 && x.y==1){ res+="DLRL"; x={0,0}; } if(x.x==0 && x.y==1){ res+="DRLR"; x={1,0}; } if(x.x==1){ res+="UDL"; x={0,0}; } return move(res); } int main(){ Pos S,T; { int s,t; cin>>s>>t; S=id_to_pos(s); T=id_to_pos(t); } string ans = move_to_origin(S) + "URDLUD" + reverse_moving(move_to_origin(T)); cout<<0<