/* -*- coding: utf-8 -*-
 *
 * 1000.cc:  No.1000 Point Add and Array Add - yukicoder
 */

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
 
using namespace std;

/* constant */

const int MAX_N = 200000;

/* typedef */

typedef long long ll;

template <typename T, const int MAX_N>
struct BIT {
  int n;
  T bits[MAX_N + 1];
  
  BIT() {}
  BIT(int _n) { init(_n); }

  void init(int _n) {
    n = _n;
    memset(bits, 0, sizeof(bits));
  }

  T sum(int x) {
    T s = 0;
    while (x > 0) {
      s += bits[x];
      x -= (x & -x);
    }
    return s;
  }

  void add(int x, T v) {
    while (x <= n) {
      bits[x] += v;
      x += (x & -x);
    }
  }
};

/* global variables */

ll as[MAX_N], sbs[MAX_N];
BIT<int,MAX_N+1> bit;

/* subroutines */

/* main */

int main() {
  int n, q;
  scanf("%d%d", &n, &q);

  for (int i = 0; i < n; i++) scanf("%lld", as + i);

  bit.init(n + 1);
  
  while (q--) {
    char s[4];
    int x, y;
    scanf("%s%d%d", s, &x, &y);

    if (s[0] == 'A') {
      x--;
      as[x] += y;
      sbs[x] += (ll)y * bit.sum(x + 1);
    }
    else {
      bit.add(x, 1);
      bit.add(y + 1, -1);
    }
  }

  for (int i = 0; i < n; i++) {
    if (i) putchar(' ');
    printf("%lld", as[i] * bit.sum(i + 1) - sbs[i]);
  }
  putchar('\n');
  return 0;
}