#include using namespace std; typedef pair ii; typedef pair iii; int n; int a,b,c,d; int memo[222][222]; string ans[222][222]; int x[222][222]; int y[222][222]; string s[] = {"UL", "UR", "R", "LR", "LL", "L"}; int xx[] = {-2, -2, 0, 2, 2, 0}; int yy[] = {-1, 1, 2, 1, -1, -2}; stack st; queue q; iii cur; int g,h,f; int cx,cy; int main() { memset(memo, -1, sizeof memo); scanf("%d", &n); scanf("%d%d%d%d", &a, &b, &c, &d); memo[a][b] = 0; q.push(iii(ii(a,b), 0)); while (!q.empty()){ cur = q.front(); q.pop(); g = cur.first.first; h = cur.first.second; f = cur.second; if (g == c && h == d){ break; } for (int i=0; i<6; i++){ cx = g + xx[i]; cy = h + yy[i]; if (cx < 0 || cx >= n || cy < 0 || cy >= n){ continue; } if (memo[cx][cy] == -1){ memo[cx][cy] = f + 1; ans[cx][cy] = s[i]; x[cx][cy] = g; y[cx][cy] = h; q.push(iii(ii(cx, cy), f + 1)); } } } if (memo[c][d] == -1){ printf("Impossible\n"); } else { printf("%d\n", memo[c][d]); g = c; h = d; while (1){ if (g == a && h == b){ break; } st.push(ans[g][h]); cx = x[g][h]; cy = y[g][h]; g = cx; h = cy; } while (!st.empty()){ cout << st.top() << " "; st.pop(); } printf("\n"); } return 0; }