#include using namespace std; #define mp(a,b) make_pair(a,b) #define ff first #define setp setprecision(12)<>n>>s1>>s2>>d1>>d2; string path[6] = { "UL", "UR", "R", "LR", "LL", "L"}; int arr[n][n]; int wh[n][n]; string how[n][n]; fori(n) forj(n) arr[i][j] = -1; arr[s1][s2] = 1; vector qow(1,s1*n+s2); fori(qow.size()){ int x = qow[i] / n , y = qow[i] % n; fork(6){ int x1 = x + dx[k], y1 = y + dy[k]; if(x1>-1 && y1>-1 && x1 all; if(arr[d1][d2]==-1) cout<<"Impossible"; else{ while(d1!=s1 || d2!=s2){ all.push_front(how[d1][d2]); int whe = wh[d1][d2]; d1 = whe/n, d2 = whe % n; } cout<