#include using namespace std; const int maxn = 210; const pair mov[6] = {{-2, -1}, {-2, 1}, {0, 2}, {2, 1}, {2, -1}, {0, -2}}; const string str[6] = {"UL", "UR", "R", "LR", "LL", "L"}; int n, xs, ys, xt, yt; int a[maxn][maxn]; queue> qu; int main(){ scanf("%d %d %d %d %d", &n, &xs, &ys, &xt, &yt); a[xt][yt] = 1; qu.push({xt, yt}); while (!qu.empty()){ pair tg = qu.front(); qu.pop(); int x = tg.first, y = tg.second; for (int i = 0; i < 6; i++) if (0 <= x + mov[i].first && x + mov[i].first < n && 0 <= y + mov[i].second && y + mov[i].second < n && a[x + mov[i].first][y + mov[i].second] == 0){ a[x + mov[i].first][y + mov[i].second] = a[x][y] + 1; qu.push({x + mov[i].first, y + mov[i].second}); } } if (a[xs][ys] == 0) printf("Impossible"); else { cout << a[xs][ys] - 1 << endl; int x = xs, y = ys; while (x != xt || y != yt){ for (int i = 0; i < 6; i++) if (0 <= x + mov[i].first && x + mov[i].first < n && 0 <= y + mov[i].second && y + mov[i].second < n && a[x + mov[i].first][y + mov[i].second] == a[x][y] - 1){ cout << str[i] << ' '; x += mov[i].first; y += mov[i].second; break; } } } return 0; }