// ayy // ' lamo // SUBLIME HAX #include using namespace std; template ostream &operator<<(ostream &os,const pair &x) { return os<<"("< struct is_iterable { template static long check(...); template static char check(int, typename T::const_iterator = C().end()); enum { value = sizeof(check(0)) == sizeof(char), neg_value = sizeof(check(0)) != sizeof(char) }; }; template ostream &_out_str(ostream &os,const T &x) { return os<<'"'< ostream &_dbg2_5(ostream &,const T &); template using eit=typename enable_if::type; template inline ostream &_dbg3(ostream &os,eit::neg_value,const T> &x) { return os< inline ostream &_dbg3(ostream &os,eit::value,const T> &V) { os<<"{"; bool ff=0; for(const auto &E:V) _dbg2_5(ff?os<<",":os,E), ff=1; return os<<"}"; } template<> inline ostream &_dbg3(ostream &os,const string &x) { return _out_str(os,x); } template<> inline ostream &_dbg3(ostream &os,const char *const &x) { return _out_str(os,x); } template inline ostream &_dbg2_5(ostream &os,const T &x) { return _dbg3(os,x); } template ostream &_dbg2(ostream &os,vector::iterator nm,const T &x,Args&&... args); inline ostream &_dbg2(ostream &os,vector::iterator) { return os; } template inline ostream &_dbg2(ostream &os,vector::iterator nm,const char *x,Args&&... args) { return _dbg2(_dbg3(os<<" ",x),nm+1,args...); } template inline ostream &_dbg2(ostream &os,vector::iterator nm,const T &x,Args&&... args) { return _dbg2(_dbg3(os<<" "<<*nm<<"=",x),nm+1,args...); } vector split(string s) { vector Z; string z=""; s+=','; int dep=0; for(char c:s) { if(c==',' && !dep) Z.push_back(z),z=""; else z+=c; if(c=='(') ++dep; if(c==')') --dep; } return Z; } template inline ostream &_dbg1(int ln,const string &nm,Args&&... args) { auto nms=split(nm); return _dbg2(cerr<<"L"< // using namespace __gnu_pbds; typedef unsigned long long ull; typedef long long ll; typedef long double ld; //CARE typedef complex pt; const ld eps=(ld)1e-8; const ld tau=2*(ld)acosl(-1); const int inf=1e9+99; const ll linf=1e18+99; const int P=1e9+7; const int N=202; bool seen[N][N]; int dist[N][N]; pair,string> pr[N][N]; int n; const int dx[]={-1,1,2,1,-1,-2}; const int dy[]={2,2,0,-2,-2,0}; const string ds[]={"UL","UR","R","LR","LL","L"}; int32_t main() { cin>>n; int x,y; cin>>x>>y; int _x,_y; cin>>_x>>_y; swap(x,y); swap(_x,_y); seen[x][y]=1; dist[x][y]=0; pr[x][y]={{-1,-1},""}; vector > vv={{x,y}}; for(int ii=0;ii=n || yy>=n) continue; if(seen[xx][yy]) continue; seen[xx][yy]=1; dist[xx][yy]=dist[x][y]+1; pr[xx][yy]={{x,y},ds[k]}; vv.pb({xx,yy}); } } x=_x,y=_y; if(!seen[x][y]) return cout<<"Impossible"< zz; for(;~pr[x][y].fi.fi;) zz.pb(pr[x][y].se), tie(x,y)=pr[x][y].fi; reverse(zz.begin(),zz.end()); n=sz(zz); cout<