#!/bin/python3 import sys def printShortestPath(n, i_start, j_start, i_end, j_end): if (i_start+i_end)%2==1: print('Impossible') return if (i_start-i_end)%4==0 and (j_start-j_end)%2==1: print('Impossible') return if (i_start-i_end)%4==2 and (j_start-j_end)%2==0: print('Impossible') return p='' i_now=i_start j_now=j_start x=0 while i_now!=i_end or j_now!=j_end: x=x+1 if p!='': p=p+' ' if i_now>i_end: if not j_now