matrix=['CHIA', 'CANT', 'GRAC', 'BBDE'] n=4 ans=[] mem=['C','H','I','N','A'] dire=[[-1,0],[1,0],[0,-1],[0,1]] def dfs(x,y,iter): # nonlocal ans #nonlocal ans if iter==5: ans.append(1) return for i in range(4): nx,ny=x+dire[i][0],y+dire[i][1] print(nx,n...