// NOTE: it is recommended to use this even if you don't understand the following code.

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>

// constraints
#define MAXN 50000

// input data
int N;
long long K;
int u[MAXN], v[MAXN], w[MAXN];

int main() {
    // uncomment the following lines if you want to read/write from files
    // freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);

    assert(2 == scanf("%d%ld", &N, &K));
    for (int i = 0; i < N - 1; i++) {
        assert(3 == scanf("%d%d%d", &u[i],&v[i],&w[i]));
    }

    // insert your code here

    printf("%d\n", 42);  // print the result

    return 0;
}
