#include using namespace std; typedef long long ll; const int INF = (int)1.01e9; const int dx[6] = {-2, -2, 0, 2, 2, 0}; const int dy[6] = {-1, 1, 2, 1, -1, -2}; const string s[6] = { "UL", "UR", "R", "LR", "LL", "L"}; int main() { #ifdef HOME freopen("in", "r", stdin); #endif int n; while (scanf("%d", &n) == 1) { int x1, y1, x2, y2; scanf("%d%d%d%d", &x1, &y1, &x2, &y2); vector > d(n, vector(n, INF)); d[x1][y1] = 0; vector > p(n, vector(n, -1)); queue > q; q.push({x1, y1}); while (!q.empty()) { int x = q.front().first; int y = q.front().second; q.pop(); for (int k = 0; k < 6; k++) { int nx = x + dx[k]; int ny = y + dy[k]; if (!(0 <= nx && nx < n && 0 <= ny && ny < n)) continue; if (d[nx][ny] > d[x][y] + 1) { d[nx][ny] = d[x][y] + 1; p[nx][ny] = k; q.push({nx, ny}); } } } if (d[x2][y2] == INF) { cout << "Impossible" << endl; } else { vector vct; int x = x2, y = y2; while (p[x][y] != -1) { int ox = x - dx[p[x][y]]; int oy = y - dy[p[x][y]]; vct.push_back(s[p[x][y]]); x = ox; y = oy; } reverse(vct.begin(), vct.end()); assert(vct.size() == d[x2][y2]); cout << d[x2][y2] << endl; for (string s : vct) cout << s << " "; cout << endl; } } return 0; }