Digo is an evil scientist and he has a special chemical mixture that forms as vapor which can help him win against his Biggest enemy Antidigo. He has n test tubes lined up in a line each initially having zero amount of chemical.He has a list of procedure that he has to follow for preparing the evil mixture. the list has k number of steps each guiding him to put m units of ith chemical from test tube a to test tube b both included.As digo is also shrewed so he doesn't want to spend more money on buying test tubes than the size of the chemical each one will hold so he wants u to compute the size.
First line will contain n and t,number of test tubes required and steps of mixing followed by t lines each containing 4 integers p,l,a,b and where p represents the type of chemical,l is the amount of chemical added,a is the starting and b is the last test tube for adding p in them.
(test tubes are numbered from 0 to n-1)
Output t lines each containing n integers that is the minimum units of each test tube that digo requires to make his evil mixture.