#include #define OO 1e9 using namespace std; int dist[250][250]; int visited[250][250]; pair parent[250][250]; int n; int dx[]={-2,-2,0,2,2,0}; int dy[]={-1,1,2,1,-1,-2}; string moves[]={"UL","UR","R","LR","LL","L",}; void print_move(pair a, pair b){ for(int i=0; i<6; i++){ if(a.first+dx[i]==b.first && a.second+dy[i]==b.second){ cout<=n || y>=n) return 0; if(visited[x][y]) return 0; return 1; } void bfs(pair start, pair dest){ visited[start.first][start.second]=1; parent[start.first][start.second]=start; queue> q; q.push(start); while(!q.empty()){ auto t=q.front(); q.pop(); for(int i=0; i<6; i++){ if(valid(t.first+dx[i],t.second+dy[i])){ q.push({t.first+dx[i],t.second+dy[i]}); visited[t.first+dx[i]][t.second+dy[i]]=1; parent[t.first+dx[i]][t.second+dy[i]]=t; dist[t.first+dx[i]][t.second+dy[i]]= dist[t.first][t.second]+1; } } } } int main() { cin>>n; int a,b,c,d; cin>>a>>b>>c>>d; bfs({a,b}, {c,d}); if(visited[c][d]==0){ cout<<"Impossible"<> path; int x=c; int y=d; while(parent[x][y]!=make_pair(x,y)){ path.push_back({x,y}); auto temp=parent[x][y]; x=temp.first; y=temp.second; } path.push_back({a,b}); reverse(path.begin(),path.end()); cout<