from typing import Tuple


def read_data_from(file_: str) -> Tuple[dict, list]:
    """Get rules and messages from file."""
    fio = open(file_, "r")
    rules = {}
    for line in fio:
        if line == "\n":
            break
        idx, rule = line.rstrip().split(": ")
        rules[int(idx)] = rule.replace('"', "")
    return rules, fio.read().splitlines()