// eddy1021 #pragma GCC optimize("O3") #include using namespace std; typedef double D; typedef long double LD; typedef long long LL; typedef pair PII; typedef pair PLL; #define mod9 1000000009LL #define mod7 1000000007LL #define INF 1023456789LL #define INF16 10000000000000000LL #define eps 1e-9 #define SZ(x) (int)(x).size() #define ALL(x) (x).begin(), (x).end() #define IOS ios_base::sync_with_stdio(0); cin.tie(0) #ifndef ONLINE_JUDGE #define debug(...) printf(__VA_ARGS__) #else #define debug(...) #endif inline LL getint(){ LL _x=0,_tmp=1; char _tc=getchar(); while( (_tc<'0'||_tc>'9')&&_tc!='-' ) _tc=getchar(); if( _tc == '-' ) _tc=getchar() , _tmp = -1; while(_tc>='0'&&_tc<='9') _x*=10,_x+=(_tc-'0'),_tc=getchar(); return _x*_tmp; } inline LL add( LL _x , LL _y , LL _mod = mod7 ){ _x += _y; return _x >= _mod ? _x - _mod : _x; } inline LL sub( LL _x , LL _y , LL _mod = mod7 ){ _x -= _y; return _x < 0 ? _x + _mod : _x; } inline LL mul( LL _x , LL _y , LL _mod = mod7 ){ _x *= _y; return _x >= _mod ? _x % _mod : _x; } LL mypow( LL _a , LL _x , LL _mod ){ if( _x == 0 ) return 1LL; LL _ret = mypow( mul( _a , _a , _mod ) , _x >> 1 , _mod ); if( _x & 1 ) _ret = mul( _ret , _a , _mod ); return _ret; } LL mymul( LL _a , LL _x , LL _mod ){ if( _x == 0 ) return 0LL; LL _ret = mymul( add( _a , _a , _mod ) , _x >> 1 , _mod ); if( _x & 1 ) _ret = add( _ret , _a , _mod ); return _ret; } inline bool equal( D _x , D _y ){ return _x > _y - eps && _x < _y + eps; } void sleep( double sec = 1021 ){ clock_t s = clock(); while( clock() - s < CLOCKS_PER_SEC * sec ); } #define Bye exit(0) int __ = 1 , _cs; /*********default*********/ void build(){ } #define N 222 bool gt[ N ][ N ]; pair bk[ N ][ N ]; string bkc[ N ][ N ]; int n , si , sj , di , dj; int dli[]={-2,-2,0,2,2,0}; int dlj[]={-1,1,2,1,-1,-2}; vector ds = {"UL", "UR", "R", "LR", "LL", "L"}; void init(){ n = getint(); si = getint(); sj = getint(); di = getint(); dj = getint(); } queue< pair > Q; bool in( int xi , int xj ){ return 0 <= xi and xi < n and 0 <= xj and xj < n; } void solve(){ Q.push( { si , sj } ); gt[ si ][ sj ] = true; while( Q.size() ){ int ni , nj; tie( ni , nj ) = Q.front(); Q.pop(); for( int dir = 0 ; dir < 6 ; dir ++ ){ int nxti = ni + dli[ dir ]; int nxtj = nj + dlj[ dir ]; if( not in( nxti , nxtj ) ) continue; if( gt[ nxti ][ nxtj ] ) continue; Q.push( { nxti , nxtj } ); gt[ nxti ][ nxtj ] = true; bk[ nxti ][ nxtj ] = { ni , nj }; bkc[ nxti ][ nxtj ] = ds[ dir ]; } } if( not gt[ di ][ dj ] ) puts( "Impossible" ); else{ vector ans; while( di != si or dj != sj ){ ans.push_back( bkc[ di ][ dj ] ); tie( di , dj ) = bk[ di ][ dj ]; } reverse( ans.begin() , ans.end() ); printf( "%d\n" , (int)ans.size() ); for( size_t i = 0 ; i < ans.size() ; i ++ ) printf( "%s%c" , ans[ i ].c_str() , " \n"[ i + 1 == ans.size() ] ); } } int main(){ build(); //__ = getint(); while( __ -- ){ init(); solve(); } }