#include<fstream>
using namespace std;
ifstream in(investitie.in);
ofstream out(investitie.out);
int v[200001];
int main()
{ int n, L,st,dr,s,i,j;
in>>n>>L;
for( i=1;i<=L;i++)
{in>>st>>dr>>s;
for(j=st;j<=dr;j++)
v[j[=v[j]+s;
}
for(int i=1i<=n;i++)
out<<v[i]<<" ";
in.close();
out.close();
}