// WARNING: this is a generic template, not specific to any task

import java.util.*;
import java.io.*;
import java.lang.*;

public class tourdetree {
    public static void main(String[] args) throws FileNotFoundException, IOException {
        InputStream fin = System.in;
        OutputStream fout = System.out;
        // uncomment the following lines if you want to read/write from files
        //fin = new FileInputStream("input.txt");
        //fout = new FileOutputStream("output.txt");

        Scanner scn = new Scanner(fin);
        PrintStream prnt = new PrintStream(fout);

        int N = scn.nextInt();
        int K = scn.nextInt();
        int[] a = new int[N-1], b = new int[N-1], c = new int[N-1];
        for (int i = 0; i < N-1; i++) {
            a[i] = scn.nextInt();
            b[i] = scn.nextInt();
            c[i] = scn.nextInt();
        }

        // insert your code here

        prnt.format("%d\n", 42); // print the result
        fout.flush();
    }
}
