#include typedef int integer; #define int long long #define pb push_back #define mp make_pair #define sz(x) (int) x.size() #define mod 1000000007 using namespace std; int m[6][2] = {{-1, -2}, {1, -2}, {2, 0}, {1, 2}, {-1, 2}, {-2, 0}}; string c[6] = {"UL", "UR", "R", "LR", "LL", "L"}; int n; int xs, ys, xd, yd; int vis[200][200]; integer main() { cin >> n >> xs >> ys >> xd >> yd; int ans = 0; string s; queue, pair > > q; q.push(mp(mp(xs, ys), mp(0LL, ""))); while (!q.empty()){ int x = q.front().first.first; int y = q.front().first.second; int dist = q.front().second.first; string k = q.front().second.second; if (x == xd && y == yd) { ans = dist; s = k; break; } q.pop(); if (vis[x][y]) continue; vis[x][y] = 1; for (int i = 0; i < 6; i++){ int xx = x + m[i][1]; int yy = y + m[i][0]; if (xx < 0 || yy < 0 || xx >= n || yy >= n) continue; if (vis[xx][yy]) continue; q.push(mp(mp(xx, yy), mp(dist + 1, k + " " + c[i]))); } } if (ans) { cout << ans << endl; cout << s.substr(1, s.length() - 1) << endl; } else { cout << "Impossible\n"; } }