#include using namespace std; string s[200][200]; int vis[200][200]; vector< vector < pair > >ori(200,vector > (200)); int n,sx,sy,ex,ey; void bfs() { queue >q; q.push(make_pair(sx,sy)); vis[sx][sy]=1; while(!q.empty()) { int x=q.front().first; int y=q.front().second; q.pop(); if(x-2>=0 && y-1>=0 && x-2=0 && y+1>=0 && x-2=0 && y+1>=0 && x+2=0 && y-1>=0 && x+2=0 && vis[x][y-2]==0) { vis[x][y-2]=vis[x][y]+1; s[x][y-2]="L"; ori[x][y-2]=make_pair(x,y); q.push(make_pair(x,y-2)); } if(vis[ex][ey]) break; } if(vis[ex][ey]==0) { cout<<"Impossible"<path; int x=ori[ex][ey].first,y=ori[ex][ey].second; path.push(s[ex][ey]); while(x!=sx || y!=sy) { int a=x,b=y; path.push(s[x][y]); x=ori[a][b].first,y=ori[a][b].second; } while(!path.empty()) { cout<>n>>sx>>sy>>ex>>ey; for(int i=0;i<200;i++) { for(int j=0;j<200;j++) vis[i][j]=0; } bfs(); return 0; }