#include using namespace std; const int maxn = 200 + 15; int n , dis[maxn][maxn]; pair < int , int > pre[maxn][maxn]; int op[maxn][maxn]; int dir[6][2] = {-2 , -1 , -2 , 1 , 0 , 2 , 2 , 1 , 2 , -1 , 0 , -2 }; queue < pair < int , int > >que; int main( int argc , char * argv[] ){ cin >> n ; int stx , sty , edx , edy; cin >> stx >> sty >> edx >> edy; memset( pre , -1 , sizeof( pre ) ); memset( dis , -1 , sizeof( dis ) ); memset( op , -1 , sizeof( op ) ); que.push( { stx , sty } ); dis[stx][sty] = 0; while( !que.empty() ){ pair < int , int > s = que.front() ; que.pop(); for(int i = 0 ; i < 6 ; ++ i){ int newx = s.first + dir[i][0]; int newy = s.second + dir[i][1]; if( min( newx , newy ) >= 0 && max( newx , newy ) < n && dis[newx][newy] == -1 ){ dis[newx][newy] = dis[s.first][s.second] + 1; pre[newx][newy] = { s.first , s.second }; op[newx][newy] = i; que.push( { newx , newy } ); } } } if( dis[edx][edy] == -1 ){ puts( "Impossible" ); return 0; } vector < string > ans; printf( "%d\n" , dis[edx][edy] ); for(int x = edx , y = edy ; x >= 0 && y >= 0 ; ){ pair < int , int > af = pre[x][y]; if( op[x][y] != -1 ){ if( op[x][y] == 0 ) ans.push_back( "UL" ); else if( op[x][y] == 1 ) ans.push_back( "UR" ); else if( op[x][y] == 2 ) ans.push_back( "R" ); else if( op[x][y] == 3 ) ans.push_back( "LR" ); else if( op[x][y] == 4 ) ans.push_back( "LL" ); else ans.push_back( "L" ); } x = af.first; y = af.second; } reverse(ans.begin(),ans.end()); for(auto && it : ans) printf("%s " , it.c_str()); puts( "" ); return 0; }