#!/bin/python import sys moves = [[-1,-2],[1,-2],[2,0],[1,2],[-1,2],[-2,0]] dic1 = {(-2,0):"L", (2,0):"R",(-1,-2):"UL", (1,-2):"UR",(-1,2):"LL",(1,2):"LR" } def bfs(point,visited,n): global moves x,y,path = point re = [] for move in moves: x1 = x + move[0] y1 = y + move[1] if x1 >=0 and x1 < n and y1 >=0 and y1