//By Don4ick //#define _GLIBCXX_DEBUG #include typedef long long ll; typedef long double ld; typedef unsigned int ui; #define forn(i, n) for (int i = 1; i <= n; i++) #define pb push_back #define all(x) x.begin(), x.end() #define y1 qwer1234 const double PI = acos(-1.0); const int DIR = 6; const int Y[] = {-1, 1, 2, 1, -1, -2}; const int X[] = {-2, -2, 0, 2, 2, 0}; const int N = 205; using namespace std; const string NAMES[] = {"UL", "UR", "R", "LR", "LL", "L"}; int n, x1, y1, x2, y2, d[N][N]; vector < string > ans; queue < pair < int, int > > q; bool in(int x, int y) { return x >= 0 && x < n && y >= 0 && y < n; } int main() { //ios_base::sync_with_stdio(false); //cin.tie(NULL); //cout.tie(NULL); //freopen(".in", "r", stdin); //freopen(".out", "w", stdout); cin >> n >> x1 >> y1 >> x2 >> y2; for (int i = 0; i < n; i++) fill(d[i], d[i] + n, -1); d[x2][y2] = 0; q.push({x2, y2}); while(!q.empty()) { int x = q.front().first; int y = q.front().second; q.pop(); for (int i = 0; i < DIR; i++) { int tx = x + X[i], ty = y + Y[i]; if (in(tx, ty) && d[tx][ty] == -1) { d[tx][ty] = d[x][y] + 1; q.push({tx, ty}); } } } if (d[x1][y1] == -1) { cout << "Impossible" << endl; return 0; } int x = x1, y = y1; while(x != x2 || y != y2) { for (int i = 0; i < DIR; i++) { int tx = x + X[i], ty = y + Y[i]; if (in(tx, ty) && d[tx][ty] == d[x][y] - 1) { ans.pb(NAMES[i]); x = tx; y = ty; break; } } } cout << (int)ans.size() << endl; for (auto it : ans) cout << it << ' '; return 0; }