parsed = {
const [instructions, network] = input.trim().split("\n\n");
const nodes = new Map(
network.split("\n").map((l) => {
const [, name, L, R] = l.match(/(\w+) = \((\w+), (\w+)\)/);
return [name, { L, R }];
})
);
return { instructions, nodes };
}