#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 k ,d;
cin>>k>>d;
b[n-k]+=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]<<" ";
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7Cglpb3M6OnN5bmNfd2l0aF9zdGRpbygwKTsKCWNpbi50aWUoMCk7Cgljb3V0LnRpZSgwKTsKCWludCBuIDsKCWNpbj4+bjsKCWludCBhW25dOwoJbG9uZyBsb25nIGJbbisxXT17fTsKCWZvcihpbnQgaT0wOyBpPG4gOyBpKyspCgkJY2luPj5hW2ldOwoJaW50IHE7CgljaW4+PnE7Cglmb3IoaW50IGk9MDsgaTxxOyBpKyspewoJCWludCBrICxkOwoJY2luPj5rPj5kOwoJYltuLWtdKz1kOwoJfQoJZm9yKGludCBpPTA7IGk8bi0xOyBpKyspCgkJYltpKzFdKz1iW2ldOwoJZm9yKGludCBpPTA7IGk8bjsgaSsrKQoJCWNvdXQ8PGFbaV0rYltpXTw8IiAiOwp9Cg==