#include using namespace std; const int N = 210; const string s[] = {"UL", "UR", "R", "LR", "LL", "L"}; const int dx[] = { -2, -2, 0, +2, +2, 0}; const int dy[] = { -1, +1, +2, +1, -1, -2}; int n; int dist[N][N]; pair par[N][N]; int sx, sy, ex, ey; vector ans; void bfs() { for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j) dist[i][j] = -1; dist[sx][sy] = 0; queue < pair > q; q.push(make_pair(sx, sy)); while(!q.empty()) { int x = q.front().first, y = q.front().second; q.pop(); //cerr << x << ' ' << y << ' ' << dist[x][y] << endl; for (int i = 0; i < 6; ++i) { int nx = x + dx[i], ny = y + dy[i]; if (nx < 0 || nx >= n || ny < 0 || ny >= n || dist[nx][ny] != -1) continue; q.push(make_pair(nx, ny)); dist[nx][ny] = dist[x][y] + 1; par[nx][ny] = make_pair(x, y); } } } string get_dir(int x, int y, int nx, int ny) { for (int i = 0; i < 6; ++i) { if (x + dx[i] == nx && y + dy[i] == ny) return s[i]; } assert(0); return ""; } int main() { ios_base::sync_with_stdio(false); cin.tie(0); cin >> n; cin >> sx >> sy >> ex >> ey; bfs(); if (dist[ex][ey] == -1) { cout << "Impossible\n"; return 0; } while(ex != sx || ey != sy) { int nx = par[ex][ey].first; int ny = par[ex][ey].second; ans.push_back(get_dir(nx, ny, ex, ey)); ex = nx; ey = ny; } cout << ans.size() << endl; for (int i = ans.size()-1; i >= 0; --i) cout << ans[i] << ' '; cout << endl; }