#include using namespace std; #define ll long long #define fr(i,a,b) for(ll i=a;i <= b;i++) #define fast_io ios_base::sync_with_stdio(false) #define pb push_back #define fir first #define sec second #define tr(it,x) for(it = x.begin();it != x.end();it++) #define mp make_pair #define sz(x) x.size() #define rep(i,n) for(ll i=0;i::digits10 #define pll pair int n,xi,yi,xf,yf; map m; map rm; vector ans; map st; void pre() { m["UL"] = 1; m["UR"] = 2; m["R"] = 3; m["LR"] = 4; m["LL"] = 5; m["L"] = 6; rm[1] = "UL"; rm[2] = "UR"; rm[3] = "R"; rm[4] = "LR"; rm[5] = "LL"; rm[6] = "L"; st[mp(-1,-1)] = "UL"; st[mp(-1,1)] = "UR"; st[mp(0,2)] = "R"; st[mp(1,1)] = "LR"; st[mp(1,-1)] = "LL"; st[mp(0,-2)] = "L"; } int main() { // freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); fast_io; accuracy; pre(); cin >> n; cin >> xi >> yi >> xf >> yf; if((xf-xi) % 2 != 0) cout << "Impossible\n"; else { ll x = xf - xi,y = yf - yi; // cout << "Hello " << x << " " << y << "\n"; x /= 2; if((x-y) % 2 != 0) cout << "Impossible\n"; else { while(x != 0 || y != 0) { if(x > 0) { if(y > 0) { ans.pb(m[st[mp(1,1)]]); x--; y--; } else if(y < 0) { ans.pb(m[st[mp(1,-1)]]); x--; y++; } else { assert(x % 2 == 0); fr(i,1,x/2) ans.pb(m[st[mp(1,-1)]]); fr(i,1,x/2) ans.pb(m[st[mp(1,1)]]); break; } } else if(x < 0) { if(y > 0) { ans.pb(m[st[mp(-1,1)]]); x++; y--; } else if(y < 0) { ans.pb(m[st[mp(-1,-1)]]); x++; y++; } else { x *= -1; assert(x % 2 == 0); fr(i,1,x/2) ans.pb(m[st[mp(-1,1)]]); fr(i,1,x/2) ans.pb(m[st[mp(-1,-1)]]); break; } } else if(x == 0) { if(y > 0) { ans.pb(m[st[mp(0,2)]]); y -= 2; } else { ans.pb(m[st[mp(0,-2)]]); y += 2; } } } sort(ans.begin(),ans.end()); cout << sz(ans) << "\n"; rep(i,sz(ans)) { cout << rm[ans[i]] << " "; } cout << "\n"; } } }