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.
import bisect
import os, sys, math
from io import BytesIO, IOBase
from collections import defaultdict, deque
ip = lambda: input()
it = lambda: int(input())
ma = lambda: map(int, input().split())
li = lambda: list(map(int, input().split()))

MOD = 10 ** 9 + 7
MD = 998244353
mod = 100007
MIL = 1000000
inf = float('inf')
ye = "YES"
ne = "NO"

def ncr(n, r):
    if r > n:
        return 0
    if r < 0:
        return 0
    if r == 0:
        return 1
    if r > n - r:
        return ncr(n, n - r)
    x = 1
    for i in range(1, r + 1):
        x = x*(n - i + 1)//i
    return x
def main():
    for _ in range(1):
        n, m, k = ma()
        a = li()
        o = []
        c = [0]*(m+1)
        for i in range(m):
            x, y, d = ma()
            o.append((x, y, d))
        for i in range(k):
            x, y = ma()
            c[x-1] += 1
            c[y] -= 1
        s = [c[0]]*(m+1)
        for i in range(1, m+1):
            s[i] = c[i] + s[i-1]
        zz = [0]*(n+1)
        for i in range(m):
            d = o[i][2]*s[i]
            x = o[i][0]
            y = o[i][1]
            zz[x-1] += d
            zz[y] -= d
        zs = [zz[0]]*(n+1)
        for i in range(1, n+1):
            zs[i] = zs[i-1] + zz[i]
        for i in range(n):
            a[i] += zs[i]
        print(*a)
    # Fast IO Region
BUFSIZE = 8192
class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")

input = lambda: sys.stdin.readline().rstrip("\r\n")
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

def nc2(n):
    return (n * (n - 1)) // 2


def ap_sum(a, d, n):
    return ((2 * a + (n - 1) * d) * n) // 2


def ncrr(n, r):
    if 2 * r > n:
        return ncr(n, n - r)
    x = 1
    for i in range(r):
        x = x * (n - i) // (i + 1)
    return x


def powerset(a):
    p = [[]]
    for i in range(len(a)):
        x = p.copy()
        for j in p:
            x.append(j + [a[i]])
        p = x
    return p


def segfunc(x, y):
    return x + y


class SegmentTree(object):
    def __init__(self, A, dot, unit):
        n = 1 << (len(A) - 1).bit_length()
        tree = [unit] * (2 * n)
        for i, v in enumerate(A):
            if v:
                #tree[i + n] = 1
                tree[i + n] = v
        for i in range(n - 1, 0, -1):
            tree[i] = dot(tree[i << 1], tree[i << 1 | 1])
        self._n = n
        self._tree = tree
        self._dot = dot
        self._unit = unit

    def __getitem__(self, i):
        return self._tree[i + self._n]

    def update(self, i, v):
        i += self._n
        self._tree[i] = v
        while i != 1:
            i >>= 1
            self._tree[i] = self._dot(self._tree[i << 1], self._tree[i << 1 | 1])

    def add(self, i, v):
        self.update(i, self[i] + v)

    def sum(self, l, r):
        l += self._n
        r += self._n
        l_val = r_val = self._unit
        while l < r:
            if l & 1:
                l_val = self._dot(l_val, self._tree[l])
                l += 1
            if r & 1:
                r -= 1
                r_val = self._dot(self._tree[r], r_val)
            l >>= 1
            r >>= 1
        return self._dot(l_val, r_val)


def Max_Subarray_Sum(a, n):
    max_so_far = -inf - 1
    max_ending_here = 0
    start = 0
    end = 0
    s = 0
    for i in range(0, n):
        max_ending_here += a[i]

        if max_so_far < max_ending_here:
            max_so_far = max_ending_here
            start = s
            end = i

        if max_ending_here < 0:
            max_ending_here = 0
            s = i + 1
    ans = [max_so_far, start, end]
    return ans


def Inversion_Merge(arr, left, mid, right):
    i = left
    j = mid
    k = 0
    invCount = 0
    temp = [0 for x in range(right - left + 1)]

    while (i < mid) and (j <= right):
        if arr[i] < arr[j]:
            temp[k] = arr[i]
            k += 1
            i += 1

        else:
            temp[k] = arr[j]
            invCount += mid - i
            k += 1
            j += 1

    while i < mid:
        temp[k] = arr[i]
        k += 1
        i += 1

    while j <= right:
        temp[k] = arr[j]
        k += 1
        j += 1

    k = 0
    for i in range(left, right + 1):
        arr[i] = temp[k]
        k += 1

    return invCount


def Inversion_Sum(arr, left, right):
    invCount = 0

    if right > left:
        mid = (right + left) // 2

        invCount = Inversion_Sum(arr, left, mid)
        invCount += Inversion_Sum(arr, mid + 1, right)
        invCount += Inversion_Merge(arr, left, mid + 1, right)

    return invCount


def Inversions(arr, n):
    return Inversion_Sum(arr, 0, n - 1)


if __name__ == '__main__':
    main()