Greg has an array *a* = *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub> and *m* operations. Each operation looks as: *l*<sub class="lower-index">*i*</sub>, *r*<sub class="lower-index">*i*</sub>, *d*<sub class="lower-index">*i*</sub>, (1 ≤ *l*<sub class="lower-index">*i*</sub> ≤ *r*<sub class="lower-index">*i*</sub> ≤ *n*). To apply operation *i* to the array means to increase all array elements with numbers *l*<sub class="lower-index">*i*</sub>, *l*<sub class="lower-index">*i*</sub> + 1, ..., *r*<sub class="lower-index">*i*</sub> by value *d*<sub class="lower-index">*i*</sub>.

Greg wrote down *k* queries on a piece of paper. Each query has the following form: *x*<sub class="lower-index">*i*</sub>, *y*<sub class="lower-index">*i*</sub>, (1 ≤ *x*<sub class="lower-index">*i*</sub> ≤ *y*<sub class="lower-index">*i*</sub> ≤ *m*). That means that one should apply operations with numbers *x*<sub class="lower-index">*i*</sub>, *x*<sub class="lower-index">*i*</sub> + 1, ..., *y*<sub class="lower-index">*i*</sub> to the array.

Now Greg is wondering, what the array *a* will be after all the queries are executed. Help Greg.
The first line contains integers *n*, *m*, *k* (1 ≤ *n*, *m*, *k* ≤ 10<sup class="upper-index">5</sup>). The second line contains *n* integers: *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub> (0 ≤ *a*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">5</sup>) — the initial array.

Next *m* lines contain operations, the operation number *i* is written as three integers: *l*<sub class="lower-index">*i*</sub>, *r*<sub class="lower-index">*i*</sub>, *d*<sub class="lower-index">*i*</sub>, (1 ≤ *l*<sub class="lower-index">*i*</sub> ≤ *r*<sub class="lower-index">*i*</sub> ≤ *n*), (0 ≤ *d*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">5</sup>).

Next *k* lines contain the queries, the query number *i* is written as two integers: *x*<sub class="lower-index">*i*</sub>, *y*<sub class="lower-index">*i*</sub>, (1 ≤ *x*<sub class="lower-index">*i*</sub> ≤ *y*<sub class="lower-index">*i*</sub> ≤ *m*).

The numbers in the lines are separated by single spaces.
n,m,k = [int(x) for x in input().split(" ")]
inital_arr = [int(x) for x in input().split(" ")]

operations = []
for _ in range(m):
    operations.append([int(x) for x in input().split(" ")])
    
queries = []

for _ in range(k):
    queries.append([int(x) for x in input().split(" ")])


# generate prefix sum arrays for each operation
operationn_pref_sums = []
for op in operations:
    temp = [0]*len(inital_arr)
    # print(f"op: {op}")
    d = op[2]
    for i in range(op[0]-1, op[1]):
        temp[i] += d
        
    # print(temp)
    operationn_pref_sums.append(temp)
#generate arrays from operation application step

# #? [n,m] Apply operations from n to m
# inital_arr
for quer in queries:
    for q in range(quer[0]-1, quer[1]):
        inital_arr = [sum(x) for x in zip(inital_arr, operationn_pref_sums[q])]

for x in inital_arr:
    print(x, end=" ")

# 3 3 3

# 1 2 3

# #? Family of operations
# #! 1) 1 2 1
# #! 2) 1 3 2
# #! 3) 2 3 4

# #? [n,m] Apply operations from n to m
# 1 2 -> 1,2
# 1 3 -> 1,2,3
# 2 3 -> 2,3

# 2 5


# 1 2 3

# 2 3 3
# 4 5 5
# 5 6 5
# 7 8 7
# 7 12 11
# 9 14 13
# 9 18 17

# #########
# 9 18 17

 						 	     		 			    	   	