def parse_input(txt_path):
    """parse input TXT file to wire list and four digits list"""
    with open(txt_path, encoding="UTF-8") as file:
        wires_list = []
        digits_list = []
        for line in file:
            wires, digits = line.strip().split(" | ")
            wires_list.append(wires.split(" "))
            digits_list.append(digits.split(" "))

    return wires_list, digits_list