using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp7
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = Convert.ToInt32(Console.ReadLine());
            string[,] S = new string[n-1, 3];
            string[] str = new string[3];
            for (int i = 0; i < n-1; i++)
            {
                str = Console.ReadLine().Split();
                S[i, 0] = str[0];
                S[i, 1] = str[1];
                S[i, 2] = str[2];
            }
            Console.Write(0);
            Console.ReadKey();
        }
    }
}