using System;

namespace Takmicenje
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split(" ");
            int N = int.Parse(s[0]);
            int M = int.Parse(s[1]);

            int promene;

            int[,] putevi = new int[M, 3];
            for (int i = 0; i < M; i++)
            {
                s = Console.ReadLine().Split(" ");
                for (int j = 0; j < 3; j++)
                    putevi[i, j] = int.Parse(s[j]);
            }

            s = Console.ReadLine().Split(" ");
            int Mika = int.Parse(s[0]);
            int Laza = int.Parse(s[1]);

            
        }
    }
}