#include using namespace std; #define fi first #define se second #define pb push_back //#define FILE #define taskname "" #define taski taskname".in" #define tasko taskname".out" typedef long long ll; typedef unsigned int uint; int n, x, y, xx, yy; vector ans; int f(string x) { if(x == "UL") return 0; if(x == "UR") return 1; if(x == "R") return 2; if(x == "LR") return 3; if(x == "LL") return 4; if(x == "L") return 5; assert(false); } bool comp(string a, string b) { return f(a) < f(b); } int main() { ios:: sync_with_stdio(false); #ifdef HOME freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #elif defined(FILE) freopen(taski, "r", stdin); freopen(tasko, "w", stdout); #endif cin >> n; cin >> x >> y >> xx >> yy; if((x - xx + 10000) % 2 != 0) { cout << "Impossible"; return 0; } if(((yy - y) + (x - xx) / 2 + 10000) % 2 != 0) { cout << "Impossible"; return 0; } while(x != xx) { string s = ".."; if(x < xx) { s[0] = 'L'; x += 2; } else { s[0] = 'U'; x -= 2; } if(y < yy) { s[1] = 'R'; y++; } else { s[1] = 'L'; y--; } ans.push_back(s); } while(y != yy) { string s; if(y < yy) { y += 2; s = "R"; } else { y -= 2; s = "L"; } ans.push_back(s); } sort(ans.begin(), ans.end(), comp); cout << ans.size() << "\n"; for(auto s : ans) cout << s << " "; return 0; }