from typing import Dict
from typing import List


def avoid_body(my_head: Dict[str, int], body: List[dict]):
    """
    my_head: Dictionary of x/y coordinates of the Battlesnake head.
            e.g. {"x": 0, "y": 0}
    my_body: List of dictionaries of x/y coordinates for every segment of a Battlesnake.
            e.g. [ {"x": 0, "y": 0}, {"x": 1, "y": 0}, {"x": 2, "y": 0} ]
    possible_moves: List of strings. Moves to pick from.
            e.g. ["up", "down", "left", "right"]

    return: The list of remaining possible_moves, with the 'neck' direction removed
    """
    bad_moves = set()
    right = { "x": my_head["x"] + 1, "y": my_head["y"] }
    left = { "x": my_head["x"] - 1, "y": my_head["y"] }
    up = { "x": my_head["x"], "y": my_head["y"] + 1 }
    down = { "x": my_head["x"], "y": my_head["y"] - 1 }
    for part in body:
        print(f"{part} <> {right}")
        if ((part["x"] == right["x"] and part["y"] == right["y"])):
            print("ADD RIGHT")
            bad_moves.add("right")
        print(f"{part} <> {left}")
        if ((part["x"] == left["x"] and part["y"] == left["y"])):
            print("ADD LEFT")
            bad_moves.add("left")
        print(f"{part} <> {up}")
        if ((part["x"] == up["x"] and part["y"] == up["y"])):
            print("ADD UP")
            bad_moves.add("up")
        print(f"{part} <> {down}")
        if ((part["x"] == down["x"] and part["y"] == down["y"])):
            print("ADD DOWN")
            bad_moves.add("down")

    return bad_moves