The first line contains the number of gardens N (1≤N≤105), the number of operations M (1≤M≤106), and the daily growth k of every plant (1≤k≤109).
Each of the next M lines describes one operation, given in increasing order of day. l, r, and x are between 1 and N with l≤r, and every other number is an integer between 1 and 109. Onjo refuses to do two operations on the same day, so at most one operation happens per day.