#include using namespace std; typedef long long ll; #define INF (long long)(10e9+7) #define REP(i,n) for(ll i = 0; i < n; i++) #define REP1(i,n) for(ll i = 1; i <= n; i++) ll A[200200], B[200200]; int main(void) { ll N, Q; char c; ll x, y; cin >> N >> Q; REP(i, N) cin >> A[i]; REP(i, Q) { cin >> c >> x >> y; if(c=='A') { A[x-1] += y; } else { for(ll i = x; i <= y; i++) { B[i - 1] += A[i - 1]; } } } REP(i, N) cout << B[i] << " "; cout << endl; }