#include using namespace std; #define ST first #define ND second #define PB push_back #define MP make_pair #define REP(i, n) for (int (i) = 0; (i) < (n); (i)++) #define FOR(i, a, b) for (int (i) = (a); (i) <= (b); (i)++) #define FORD(i, b, a) for (int (i) = (b); (i) >= (a); (i)--) #define FORE(x, u) for (auto (x): (u)) #define ALL(u) (u).begin(), (u).end() #define INF 0x7fffffff #define INFLL 0x7fffffffffffffffLL typedef long long LL; typedef unsigned long long ULL; typedef long double LD; typedef pair PII; typedef pair PLL; typedef vector VI; typedef vector VLL; typedef vector VPII; typedef vector VPLL; typedef set SI; typedef set SLL; typedef set SPII; typedef set SPLL; inline void get(int &x) { scanf("%d", &x); } inline void get(LL &x) { scanf("%lld", &x); } inline void get(ULL &x) { scanf("%llu", &x); } inline void get(double &x) { scanf("%lf", &x); } inline void get(LD &x) { scanf("%Lf", &x); } inline void get(char *s) { scanf("%s", s); } inline void get(char &c) { while ((c = getchar()) > 126 || c < 33); } inline void put(int x) { printf("%d", x); } inline void put(LL x) { printf("%lld", x); } inline void put(ULL x) { printf("%llu", x); } inline void put(double x) { printf("%lf", x); } inline void put(LD x) { printf("%Lf", x); } inline void put(const char *s) { printf(s); } inline void put(char c) { putchar(c); } template inline void putl(const T &x) { put(x), put(' '); } template inline void putn(const T &x) { put(x), put('\n'); } int main() { int n; get(n); int x0, y0, x1, y1; get(x0); get(y0); get(x1); get(y1); int rows_diff = abs(x1 - x0); int cols_diff = abs(y1 - y0); if (rows_diff % 2 != 0 || cols_diff % 2 != (rows_diff / 2) % 2) { putn("Impossible"); return 0; } int moves = rows_diff / 2; if (cols_diff > rows_diff / 2) { moves += (cols_diff - rows_diff / 2) / 2; } putn(moves); while (x0 > x1) { if (y0 >= y1) { putl("UL"); x0 -= 2; y0--; } else { putl("UR"); x0 -= 2; y0++; } } while (y0 < y1 - rows_diff / 2) { putl("R"); y0 += 2; } while (x0 < x1) { if (y0 <= y1) { putl("LR"); x0 += 2; y0++; } else { putl("LL"); x0 += 2; y0--; } } while (y0 > y1) { putl("L"); y0 -= 2; } return 0; }