"use strict";
// import bigInt from 'big-integer'

const Main = input => {
  input = input.trim().split("\n");
  input.shift();
  const dict = {};
  let peopleCount = 0;
  for (let i = 0; i < input.length; i++) {
    peopleCount++;
    const evidenceNum = input[i];
    for (let j = 0; j < evidenceNum; j++) {
      i += j + 1;
      const evidence = input[i].split(" ");
      if (i in dict) {
        dict[peopleCount].push({
          [evidence[0]]: evidence[1],
        });
      } else {
        dict[peopleCount] = [{ [evidence[0]]: evidence[1] }];
      }
      // console.log("dict : ", dict);
    }
  }
};

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
