def dimensions_from_file(fn: str) -> list[Dimension]: return list(dimensions_from_lines(open(relative_path(__file__, fn))))
def from_file(cls, fn: str) -> 'Node': return cls.from_str(open(relative_path(__file__, fn)).readline())
def door_id_from_file(fn: str) -> str: return open(relative_path(__file__, fn)).readline().strip()
def many_from_file(cls, fn: str) -> list['Number']: return list(cls.many_from_lines(open(relative_path(__file__, fn))))
def from_file(cls, fn: str) -> 'HeightMap': return cls.from_lines(open(relative_path(__file__, fn)))
def data_from_file(fn: str) -> tuple[RuleList, Ticket, list[Ticket]]: return data_from_lines(open(relative_path(__file__, fn)))
def load_document(fn: str): return json.load(open(relative_path(__file__, fn)))
def game_from_file(fn: str) -> Game: return game_from_lines(open(relative_path(__file__, fn)))
def from_file(cls, fn: str) -> 'Packet': return cls.from_hex(open(relative_path(__file__, fn)).readline().strip())
def serial_from_file(fn: str) -> int: return int(open(relative_path(__file__, fn)).readline())
def passports_from_file(fn: str) -> list[Passport]: return list(passports_from_lines(open(relative_path(__file__, fn))))
def state_from_file(dimensions: int, fn: str) -> set[Pos]: return set(active_positions_from_lines(dimensions, relative_path(__file__, fn)))
def load_data(fn: str) -> list[int]: return [ int(line_stripped) for line in relative_path(__file__, fn) if (line_stripped := line.strip()) ]
def input_from_file(fn: str) -> tuple[str, Rules]: return input_from_lines(open(relative_path(__file__, fn)))
def claims_from_file(fn: str) -> list[Claim]: return list(claims_from_lines(open(relative_path(__file__, fn))))
def circuit_from_file(fn: str) -> Circuit: return list(connections_from_lines(open(relative_path(__file__, fn))))
def box_ids_from_file(fn: str) -> list[str]: return box_ids_from_lines(open(relative_path(__file__, fn)))
def parse_file(cls, fn: str) -> list['Walk']: return list(cls.parse_lines(open(relative_path(__file__, fn))))
def from_file( cls, fn: str, teams: Iterable[Team] = tuple(default_teams())) -> 'Battle': return cls.from_lines(open(relative_path(__file__, fn)), teams)
def instructions_from_file(fn: str) -> list[Steps]: return list(instructions_from_lines(open(relative_path(__file__, fn))))
def tape_from_file(fn: str) -> Tape: return list(instructions_from_lines(open(relative_path(__file__, fn))))
def instructions_from_file(fn: str) -> str: return open(relative_path(__file__, fn)).readline().strip()
def spreadsheet_from_file(fn: str) -> Spreadsheet: return spreadsheet_from_lines(open(relative_path(__file__, fn)))
def frequencies_from_file(fn: str) -> list[int]: return [int(line.strip()) for line in open(relative_path(__file__, fn))]
def passes_from_file(fn: str) -> list[str]: return [line.strip() for line in open(relative_path(__file__, fn))]
def groups_from_file(fn: str) -> list[Group]: return list(groups_from_lines(open(relative_path(__file__, fn))))
def from_file(cls, fn: str): return cls.from_lines(open(relative_path(__file__, fn)))
def decks_from_file(fn: str) -> Decks: return decks_from_lines(open(relative_path(__file__, fn)))
def links_from_file(fn: str) -> list[Link]: return list(links_from_lines(open(relative_path(__file__, fn))))
def elf_count_from_file(fn: str) -> int: return int(open(relative_path(__file__, fn)).readline().strip())