#!/usr/bin/env python3
# NOTE: it is recommended to use this even if you don't understand the following code.


# input data
N, K = [int(x) for x in input().strip().split()]
a,b,c = [0]*(N-1), [0]*(N-1), [0]*(N-1)
for i in range(N-1):
    a[i], b[i], c[i] = [int(x) for x in input().strip().split()]

# insert your code here


print(42)  # print the result
