from pathlib import Path


def decode(file: Path) -> dict[tuple[int, int], bool]:
    """
    Decode file contents

    :param file: file containing the input values
    :return: 2d map of the initial slice
    """

    fh = open(file)
    decoded_map = dict()
    for y, l in enumerate(fh):
        for x, c in enumerate(l.strip()):
            active = c == '#'
            decoded_map[(x, y)] = active

    return decoded_map