#include using namespace std; #define ll long long int #define MAX 100005 #define MOD 1000000007 #define inf 10000000 #define vi vector #define vl vector #define pii pair #define pll pair #define fi first #define se second #define pb push_back #define eb emplace_back #define sarkysaurabh ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0) #define error(args...) { vector _v = split(#args, ','); err(_v.begin(), args); cerr<<'\n';} vector split(const string& s, char c) { vector v; stringstream ss(s); string x; while (getline(ss, x, c)){ v.emplace_back(x);} return move(v); } void err(vector::iterator it) {} template void err(vector::iterator it, T a, Args... args) { cerr << it -> substr((*it)[0] == ' ', it -> length()) << " = " << a << ", "; err(++it, args...); } //int bit[MAX], p[MAX]; //void upd(int i, int v=1) {while(i < MAX){bit[i] += v; i += i&-i;}} //int read(int i) {int s=0; while(i > 0){s += bit[i]; i -= i&-i;} return s;} //int fs(int i) {while(i != p[i]){p[i]=p[p[i]]; i=p[i];} return i;} //ll modexp(ll a, ll b, ll c=MOD) { ll res=1;while(b){res=b&1?(res*a)%c:res; a=(a*a)%c; b>>=1;} return res; } // auto f = [](int a, int b) -> int { return a+b; }; int dx[] = {-2,-2,0,2, 2, 0}; int dy[] = {-1, 1,2,1,-1,-2}; string res[] = {"UL", "UR", "R", "LR", "LL", "L"}; int dis[222][222]; pii par[222][222]; string get(int ax, int ay, int bx, int by) { int difx, dify; difx = bx-ax; dify = by-ay; for(int i=0;i<6;++i) if(dx[i] == difx and dy[i] == dify) return res[i]; return "NULL"; } int main() { int i,j,n,sx,sy,Dx,Dy,cx,cy,nx,ny,px,py; cin>>n; cin>>sx>>sy>>Dx>>Dy; for(i=0;i q; q.push({sx,sy}); while(q.size()) { cx = q.front().fi; cy = q.front().se; q.pop(); for(i=0;i<6;++i) { nx = cx+dx[i]; ny = cy+dy[i]; if(nx>=0 and nx=0 and ny sol; //error(dis[Dx][Dy]); cx = Dx; cy = Dy; while(!(cx == sx and cy == sy)) { px = cx; py = cy; cx = par[px][py].fi; cy = par[px][py].se; sol.pb(get(cx,cy,px,py)); //error(cx,cy); } reverse(sol.begin(), sol.end()); for(auto xx : sol) cout<