#!/bin/python import sys def possible_moves(i, j, x, y, m): return filter(lambda e: 0<=e[0] and e[0]