#include using namespace std; using ll = long long; using P = pair; #define rep(i,n) for(int i=0;i> n >> q; vector a(n),b(n+1,0l); rep(i,n) cin >> a[i]; char c; ll x,y; rep(i,q){ cin >> c >> x >> y; if (c-'A'){ for (int j=x;j<=y;j++) b[j] += a[j-1]; } else a[x-1] += y; } for (int i=1;i<=n;i++) printf("%ld ",b[i]); cout << endl; return 0; }