N, Q = map(int, input().split()) R = 10 ** 5 + 1 performance = [0 for i in range(R)] query = [] for i in range(Q): query.append(list(map(int, input().split()))) performance[query[-1][1]] += 1 performance[query[-1][2]] -= 1 for i in range(1, R): performance[i] += performance[i - 1] for i in range(R): if performance[i] > 0: performance[i] **= -1 for i in range(1, R): performance[i] += performance[i - 1] ans = [0 for i in range(N)] performance = [0] + performance for q in query: ans[q[0] - 1] += performance[q[2]] - performance[q[1]] for i in range(N): print(ans[i])