def getDirectionByPosition(x, y, army):
    """Return the direction of soldier on (x, y)
    Return None if no soldier in the army is on (x, y)"""
    for soldier in army:
        if (x, y) == soldier.getPosition():
            return soldier.direction
    return None