#include #define ll long long #define pb push_back #define pii pair #define ull unsigned long long #define mp make_pair #define s second #define f first #define _ ios_base::sync_with_stdio(false);cin.tie(0); using namespace std; const int maxn = (int)(1e5)+2; const int mod = (int)(1e9)+7; int n,xa,ya,xb,yb,u[222][222], d[222][222]; int dx[6]={-2,-2,0,2,2,0}; int dy[6]={-1,1,2,1,-1,-2}; string dir[6] = {"UL","UR","R","LR","LL","L"}; pii p[222][222]; queue q; bool check(pii x) { return x.f >= 0 && x.f < n && x.s >= 0 && x.s < n && !u[x.f][x.s]; } int main() { cin >> n; cin >> xa >> ya >>xb >> yb; q.push(mp(xa,ya)); u[xa][ya] = 1; while (!q.empty()) { pii v = q.front(); q.pop(); for (int i = 0; i < 6; i++) { pii to = mp(v.f + dx[i], v.s + dy[i]); if (check(to)) { d[to.f][to.s] = d[v.f][v.s] + 1; p[to.f][to.s] = v; u[to.f][to.s] = 1; q.push(to); } } } if (!u[xb][yb]) { puts("Impossible"); return 0; } vector ans; pii v= mp(xb,yb); while(v != mp(0,0)) { if (p[v.f][v.s]!= mp(0,0)) { pii pr = p[v.f][v.s]; int sx = v.f - pr.f, sy = v.s - pr.s; int ind = -1; for (int i = 0; i < 6; i++) if (sx==dx[i]&&sy==dy[i]) ind = i; if (ind!=-1) ans.pb(dir[ind]); } v = p[v.f][v.s]; } cout << ans.size() << endl; for (int i = ans.size()-1; i >= 0; i--) cout << ans[i] << " "; return 0; }