#include<bits/stdc++.h>
using namespace std;
vector<int> s(100010,0),b(100010,0);
int main(){
int n,m;
cin>>n>>m;
for(int i=1;i<=n;i++) cin>>s[i];
for(int i=1;i<=n;i++) b[i] = s[i]-s[i-1];
while(m--){
int l,r,c;
cin>>l>>r>>c;
b[l]+=c;
b[r+1]-=c;
}
for(int i=1;i<=n;i++){
b[i]=b[i-1]+b[i];
cout<<b[i]<<' ';
}
return 0;
}