@staticmethod
def b():
    (n, q, *lrt) = map(int, sys.stdin.read().split())
    a = np.zeros(n, dtype=int)
    for (l, r, t) in zip(*([iter(lrt)] * 3)):
        a[(l - 1):r] = t
    print(*a, sep='\n')
@staticmethod
def b():
    (n, q, *lrt) = map(int, sys.stdin.read().split())
    a = np.zeros(n, dtype=int)
    for (l, r, t) in zip(*([iter(lrt)] * 3)):
        a[(l - 1):r] = t
    print(*a, sep='\n')