#include <iostream>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n;
cin>>n;
int a[n];
long long b[n+1]={};
for(int i=0; i<n ; i++)
cin>>a[i];
int q;
cin>>q;
for(int i=0; i<q; i++){
int l,r,d;
cin>>l>>r>>d;
l--; r--;
b[l]+=d;
b[r+1]-=d;
}
for(int i=0; i<n-1; i++)
b[i+1]+=b[i];
for(int i=0; i<n; i++)
cout<<a[i]+b[i]<<" ";
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwogCmludCBtYWluKCkgewoJaW9zOjpzeW5jX3dpdGhfc3RkaW8oMCk7CgljaW4udGllKDApOwoJY291dC50aWUoMCk7CglpbnQgbjsKCWNpbj4+bjsKCWludCBhW25dOwoJbG9uZyBsb25nIGJbbisxXT17fTsKCWZvcihpbnQgaT0wOyBpPG4gOyBpKyspCgkJY2luPj5hW2ldOwoJaW50IHE7CgljaW4+PnE7Cglmb3IoaW50IGk9MDsgaTxxOyBpKyspewoJCWludCBsLHIsZDsKCWNpbj4+bD4+cj4+ZDsKCWwtLTsgci0tOwoJYltsXSs9ZDsKCWJbcisxXS09ZDsKCX0KCWZvcihpbnQgaT0wOyBpPG4tMTsgaSsrKQoJCWJbaSsxXSs9YltpXTsKCWZvcihpbnQgaT0wOyBpPG47IGkrKykKCQljb3V0PDxhW2ldK2JbaV08PCIgIjsKfQ==