n, q = map(int, input().split()) A = list(map(int, input().split())) import numpy as np A = np.array(A) B = np.zeros(n, dtype = 'int64') for _ in range(q): c, x, y = map(str, input().split()) x = int(x) y = int(y) if c == 'A': x -= 1 A[x] += y else: x, y = x-1, y-1 B[x:y+1] += A[x:y+1] #print(A) #print(B) B = list(B) print(*B)