#!/bin/python3 import sys def printShortestPath(n, i_start, j_start, i_end, j_end): print('Impossible') # Print the distance along with the sequence of moves. if __name__ == "__main__": n = int(input().strip()) i_start, j_start, i_end, j_end = input().strip().split(' ') i_start, j_start, i_end, j_end = [int(i_start), int(j_start), int(i_end), int(j_end)] printShortestPath(n, i_start, j_start, i_end, j_end)