static void Main(string[] args) { int Count; int i; int exp, co; Node a = new Node(), b = new Node(); Node result = new Node(); Count = Convert.ToInt32(Console.ReadLine()); for (i = 0; i < Count; i++) { co = Convert.ToInt32(Console.ReadLine()); exp = Convert.ToInt32(Console.ReadLine()); a.Read(co, exp); } Count = Convert.ToInt32(Console.ReadLine()); for (i = 0; i < Count; i++) { co = Convert.ToInt32(Console.ReadLine()); exp = Convert.ToInt32(Console.ReadLine()); b.Read(co, exp); } result = a + b; result.Print(); }