import sys
import json
from typing import Dict


def err(msg):
    print(msg, file=sys.stderr)
    exit(1)


def pretty_print_graph(graph: Dict):
    print(json.dumps(graph, indent=2, default=str))


def write_graph(graph: Dict):
    with open('graph.json', 'w', encoding='utf-8') as f:
        json.dump(graph, f, ensure_ascii=False, indent=2)

b6f50f1b8ace0232033d46c484f8a740ddf0b625
<mask token>

<mask token>


def pretty_print_graph(graph: Dict):
    print(json.dumps(graph, indent=2, default=str))


<mask token>

<mask token>


def pretty_print_graph(graph: Dict):
    print(json.dumps(graph, indent=2, default=str))


def write_graph(graph: Dict):
    with open('graph.json', 'w', encoding='utf-8') as f:
        json.dump(graph, f, ensure_ascii=False, indent=2)

<mask token>


def err(msg):
    print(msg, file=sys.stderr)
    exit(1)


def pretty_print_graph(graph: Dict):
    print(json.dumps(graph, indent=2, default=str))


def write_graph(graph: Dict):
    with open('graph.json', 'w', encoding='utf-8') as f:
        json.dump(graph, f, ensure_ascii=False, indent=2)

import sys
import json
from typing import Dict


def err(msg):
    print(msg, file=sys.stderr)
    exit(1)


def pretty_print_graph(graph: Dict):
    print(json.dumps(graph, indent=2, default=str))


def write_graph(graph: Dict):
    with open('graph.json', 'w', encoding='utf-8') as f:
        json.dump(graph, f, ensure_ascii=False, indent=2)
