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.
from math import *
from collections import *
from bisect import *
import heapq
import math
from itertools import permutations

def is_prime(n):

    for i in range(2,math.ceil(math.sqrt(n))):
        if(n%i==0):
            return False
    return True

def sieve(n):
    arr=[True for _ in range(n+1)]

    for i in range(2,math.ceil(math.sqrt(n))):
        if(arr[i]==True):
            for j in range(i*i,n+1,i):
                arr[j]=False

    return arr


def power(x, y, p):
    res = 1  # Initialize result

    # Update x if it is more
    # than or equal to p
    x = x % p

    if (x == 0):
        return 0

    while (y > 0):

        # If y is odd, multiply
        # x with result
        if ((y & 1) == 1):
            res = (res * x) % p

        # y must be even now
        y = y >> 1  # y = y/2
        x = (x * x) % p

    return res

def euclidean_distance(x1,y1,x2,y2):
    return sqrt(abs(x1-x2)**2+abs(y1-y2)**2)

def get_permutations(lo=0,hi=10):
    return list(permutations(range(lo,hi)))


def getDivisors(n):
    i = 1
    ans1=[]
    ans2=[]
    while i <= math.sqrt(n):

        if (n % i == 0):
            if (n / i == i):
                ans1.append(i)
            else:
                # Otherwise print both
                ans1.append(i)
                ans2.append(n//i)
        i = i + 1

    return ans1+ans2[::-1]

def solve():
    # s=input()
    # n=int(input())
    n,m,k=list(map(int,input().split()))

    lis=[]

    lis=(list(map(int,input().split())))

    temp=[]
    for _ in range(m):
        temp.append(list(map(int,input().split())))
    arr=[0 for _ in range(m+1)]

    for _ in range(k):
        x,y=list(map(int,input().split()))
        x-=1
        y-=1
        arr[x]+=1
        arr[y+1]-=1

    for i in range(1,len(arr)):
        arr[i]+=arr[i-1]

    arr2=[0 for _ in range(n+1)]
    # print(arr)

    for i,ele in enumerate(temp):
        x=ele[0]-1
        y=ele[1]

        arr2[x]+=(arr[i]*ele[2])

        arr2[y]-=(arr[i]*ele[2])

    for i in range(1,len(arr2)):
        arr2[i]+=arr2[i-1]
    for i in range(len(lis)):
        lis[i]+=arr2[i]
    print(*lis)
















if __name__ == '__main__':
    n=1
    # n=int(input())
    while(n):
        n-=1
        solve()




