include[HTML_REMOVED]
using namespace std;
int main()
{
int n,m;
cin>>n>>m;
int a[100006],b[100006];
for(int i=1;i<=n;i)
{
cin>>a[i];
}
b[0]=0;
for(int i=1;i<=n;i)
{
b[i]=a[i]-a[i-1];
}
int c,d,t;
for(int i=1;i<=m;i)
{
cin>>c>>d>>t;
b[c]+=t;
b[d+1]-=t;
}
a[0]=0;
for(int i=1;i<=n;i)
{
a[i]=a[i-1]+b[i];
cout<<a[i]<<” “;
}
return 0;
}