#include using namespace std; #define pb push_back #define mp make_pair #define F first #define S second #define fo(i, n) for(int i = 1; i <= n; ++i) typedef long long ll; typedef pair pii; typedef pair pll; const int N = 200200; const int mod = 1e9 + 7; int n, x, y, sx, sy, qs, qt; int fx, fy; int q[N]; int dx[] = {-2, -2, 0 , 2 ,2 ,0}; int dy[] = {-1, 1, 2, 1, -1, -2}; string dr[] = {"UL", "UR", "R", "LR", "LL", "L"}; int d[200][200]; int p[200][200]; inline bool ok(int x, int y) { return x >= 0 && y >= 0 && x < n && y < n; } int main() { cin >> n >> sx >> sy >> fx >> fy; q[qt++] = sx; q[qt++] = sy; memset(d, -1, sizeof d); d[sx][sy] = 0; while(qs < qt) { x = q[qs++]; y = q[qs++]; for(int i = 0; i < 6; ++i) { int tox = x + dx[i]; int toy = y + dy[i]; if(ok(tox, toy) && d[tox][toy] == -1) d[tox ][toy] = d[x][y] + 1, q[qt++] = tox, q[qt++] = toy, p[tox][toy] = i; } } if(d[fx][fy] == -1) return cout << "Impossible", 0; vector res; while(fx != sx || fy != sy) { int id = p[fx][fy]; res.pb(dr[id]); fx -= dx[id]; fy -= dy[id]; } reverse(res.begin(), res.end()); cout << res.size() << '\n'; for(string s : res) cout << s << ' '; return 0; }