import io


def parse(stdin: io.TextIOWrapper) -> set:
    """
    Parse the input into a set of x,y,z,... tuples representing the active
    cubes for an arbitrary number of dimensions.
    """

    return set(
        (x, y)
        for y, line in enumerate(stdin.read().strip().splitlines())
        for x, char in enumerate(line)
        if char == '#'
    )