#include using namespace std; #define sd(x) scanf("%d",&x) #define slld(x) scanf("%lld",&x) #define ss(x) scanf("%s",x) #define mod 1000000007 #define bitcount __builtin_popcountll #define ll long long #define pb push_back #define pi pair #define pii pair #define mp make_pair int arr[205][205]; int dist[205][205]; int n; int dir[6][2]={{-1,-2},{1,-2},{2,0},{1,2},{-1,2},{-2,0}}; string a[6]={"UL","UR","R","LR","LL","L"}; bool isvalid(int a, int b) { if(a<0||b<0||a>=n||b>=n) return false; return true; } int main() { int i,j,k; sd(n); int stx,sty,enx,eny; cin>>stx>>sty>>enx>>eny; dist[stx][sty]=1; queueq; q.push(mp(stx,sty)); while(!q.empty()) { pi temp=q.front(); // printf("%d %d\n",temp.first,temp.second ); q.pop(); for(j=0;j<=5;j++) { if(isvalid(temp.first+dir[j][1],temp.second+dir[j][0])&&!dist[temp.first+dir[j][1]][temp.second+dir[j][0]]) { dist[temp.first+dir[j][1]][temp.second+dir[j][0]]=dist[temp.first][temp.second]+1; arr[temp.first+dir[j][1]][temp.second+dir[j][0]]=j; // printf("%d %d %d\n",temp.first+dir[j][1],temp.second+dir[j][0],arr[temp.first+dir[j][1]][temp.second+dir[j][0]] ); q.push(mp(temp.first+dir[j][1],temp.second+dir[j][0])); } } } if(!dist[enx][eny]) printf("Impossible\n"); else { printf("%d\n", dist[enx][eny]-1); int x=enx; int y=eny; stacks; while(x!=stx||y!=sty) { // printf("%d %d %d %d %d\n",x,y,arr[x][y], dir[arr[x][y]][1],); s.push(a[arr[x][y]]); int p=dir[arr[x][y]][1]; int q=dir[arr[x][y]][0]; x-=p; y-=q; } while(!s.empty()) { cout<