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.
# 296 C
from typing import List

# Time Complexity: o(len(old))
# Space Complexity: o(n)
def forwardConversion(old) -> List[int]:
  newArray = [old[0]]
  for i in range(1, len(old)):
    newArray.append(old[i] - old[i-1])
  return newArray

# Time Complexity: o(len(subArr))
# Space Complexity: o(n)
def backwardConversion(subArr) -> List[int]:
  newArray = [subArr[0]]
  for i in range(1, len(subArr)):
    newArray.append(subArr[i] + newArray[i-1])
  return newArray  

# Time Complexity: o(len(operations)) #DEFINE n
# Space Complexity: o(1)
def applyOperations(subArr, operations) -> List[int]:
  # newArray = sub(subArr)
  for i in range(0, len(operations)):
    start = operations[i][0]
    end = operations[i][1]
    increaseValue = operations[i][2]
    subArr[start-1] += increaseValue
    if end < len(subArr):
      subArr[end] -= increaseValue
  return subArr

arraySize, operations, queries = map(int, input().split())
array = list(map(int, input().split()))
arrayOperations = []

for i in range(0, operations):
  start, end, increaseValue = map(int, input().split())
  arrayOperations.append([start, end, increaseValue])

for i in range(0, queries):
  operationStart, operationEnd = map(int, input().split())
  array = forwardConversion(array)
  op = arrayOperations[operationStart-1:operationEnd]
  array = applyOperations(array, op)
  array = backwardConversion(array)
  
for i in array:
  if array[-1] == i:
    print(i)
  else:  
    print(i, end = ' ')


"""
  
for i in range(0, queries):
  operationStart, operationEnd = map(int, input().split())

  for p in range(operationStart-1, operationEnd):
    start = arrayOperations[p][0]
    end = arrayOperations[p][1]
    increaseValue = arrayOperations[p][2]
    for j in range(start - 1, end):
      array[j] += increaseValue
      
for i in array:
  if array[-1] == i:
    print(i)
  else:  
    print(i, end = ' ')
print(newArray)
"""