#include using namespace std; void printShortestPath(int n, int i_start, int j_start, int i_end, int j_end) { int h; int w; int ah; int aw; int x; int y; int i; int z; int k; int l; bool p = true; h = i_start - i_end; w = j_start - j_end; ah = abs(h); aw = abs(w); z = ah/2; if ( ah % 2 != 0){ p = false; } if (aw != 0){ x = aw - z; } else { x = 0; } if ( x % 2 != 0){ p = false; } k = x/2; if (p){ y = z + k; cout << y << endl; for(i = 0; i < z; i++){ if (h >= 0){ cout << "U"; } else{ cout << "L"; } if (w > 0){ cout << "L "; w--; } else{ cout << "R "; w++; } } for(i = 0; i < (w/2); i++){ if (w > 0){ cout << "L"; } if (w < 0){ cout << "R"; } } } else{ cout << "Impossible"; } } int main() { int n; cin >> n; int i_start; int j_start; int i_end; int j_end; cin >> i_start >> j_start >> i_end >> j_end; printShortestPath(n, i_start, j_start, i_end, j_end); return 0; }