#include #define mp make_pair #define pb push_back #define f first #define s second #define ll long long using namespace std; const int N = (3e5), mod = (1e9) + 7; int main(){ int xxi, yyi; int n, xi, yi, xj, yj; scanf("%d%d%d%d%d", &n, &yi, &xi, &yj, &xj); xxi = xi, yyi = yi; vector ansu; int cu1 = 0, cu2 = 0; vector ansl; vector ansr; vector ansd; int cd1 = 0, cd2 = 0; if((yi & 1) != (yj & 1)) { printf("Impossible\n"); return 0; } while(yi > yj) { yi -= 2; if(xi >= xj && xi > 0) { xi--; ansu.pb(1); cu1++; } else if(xi + 1 < n) { xi++; ansu.pb(2); cu2++; } else { assert(0); printf("Impossible\n"); return 0; } } while(yi < yj) { yi += 2; if(xi <= xj && xi + 1 < n) { xi++; ansd.pb(3); cd1++; } else if(xi > 0) { xi--; ansd.pb(4); cd2++; } else { assert(0); printf("Impossible\n"); return 0; } } while(xi > xj) { xi -= 2; ansl.pb(1); } while(xi < xj) { xi += 2; ansr.pb(1); } if(!(xi == xj && yi == yj)) { printf("Impossible\n"); return 0; } xi = xxi, yi = yyi; printf("%d\n", ansu.size() + ansd.size() + ansl.size() + ansr.size()); bool fir = 1; for(int i : ansu) { if(fir) { fir = 0; } else { printf(" "); } if(cu1 && xi > 0) { cu1--; xi--; printf("UL"); } else { xi++; printf("UR"); } } for(int i : ansr) { if(fir) { fir = 0; } else { printf(" "); } printf("R"); } for(int i : ansd) { if(fir) { fir = 0; } else { printf(" "); } if(cd1 && xi + 1 < n) { cd1--; xi++; printf("LR"); } else { xi--; printf("LL"); } } for(int i : ansl) { if(fir) { fir = 0; } else { printf(" "); } printf("L"); } return 0; }