#include #define mod 1000000007 #define pb push_back #define mid(l, r) ((l)+(r))/2 #define len(a) (a).length() #define sz(a) (a).size() #define xx first #define yy second #define inf int(2e9) #define ff(i, a, b) for(int (i) = (a); (i) <= (b); ++(i)) #define fb(i, a, b) for(int (i) = (a); (i) >= (b); --(i)) using namespace std; typedef long long ll; typedef pair pii; template void print(const T niz[], const int siz) { for(int i=0;i val; }; bool bio[300][300]; bool check(int x, int y) { if(x<0 || x>n) return false; if(y<0 || y>n) return false; if(x==kraj.xx && y==kraj.yy) return true; if(bio[x][y]) return false; return true; } vectorans; int res=1e9; void bfs() { queue q; vectorpoom; q.push({poc,poom}); while(!q.empty()) { polje tmp=q.front(); q.pop(); bio[tmp.poz.xx][tmp.poz.yy]=true; pii pom=tmp.poz; if(pom.xx==kraj.xx && pom.yy==kraj.yy) { if(tmp.val.size() nesto=tmp.val; nesto.pb("UL"); q.push({{x-2,y-1},nesto}); } //goredesno if(check(x-2,y+1)) { bio[x-2][y+1]=true; vector nesto=tmp.val; nesto.pb("UR"); q.push({{x-2,y+1},nesto}); } //desno if(check(x,y+2)) { bio[x][y+1]=true; vector nesto=tmp.val; nesto.pb("R"); q.push({{x,y+2},nesto}); } //doledesno if(check(x+2,y+1)) { bio[x+2][y+1]=true; vector nesto=tmp.val; nesto.pb("LR"); //nesto.pb("L"); q.push({{x+2,y+1},nesto}); } //dolelevo if(check(x+2,y-1)) { bio[x+2][y-1]=true; vector nesto=tmp.val; nesto.pb("LL"); q.push({{x+2,y-1},nesto}); } //levo if(check(x,y-2)) { bio[x][y-2]=true; vector nesto=tmp.val; nesto.pb("L"); q.push({{x,y-2},nesto}); } } } int main() { cin>>n; cin>>poc.xx>>poc.yy>>kraj.xx>>kraj.yy; bfs(); if(ans.size()==0) cout<<"Impossible"; else { cout<