A, B, M = [int(n) for n in input().split()]

a  = [int(n) for n in input().split()]

b = [int(n) for n in input().split()]

ma = sorted(a)[0]

mb = sorted(b)[0]

ans = ma + mb

for m in range(M):

    x, y, c = [int(n) for n in input().split()]

    dv = a[x-1] + b[y-1] - c

    ans = min(ans , dv)

print(ans)

        
A, B, M = [int(n) for n in input().split()]

a  = [int(n) for n in input().split()]

b = [int(n) for n in input().split()]

ans = min(a) + min(b)

for m in range(M):

    x, y, c = [int(n) for n in input().split()]

    dv = a[x-1] + b[y-1] - c

    ans = min(ans , dv)

print(ans)

        

A, B, M = [int(n) for n in input().split()]
a = [int(n) for n in input().split()]
b = [int(n) for n in input().split()]
ma = sorted(a)[0]
mb = sorted(b)[0]
ans = ma + mb
for m in range(M):
    x, y, c = [int(n) for n in input().split()]
    dv = a[x - 1] + b[y - 1] - c
    ans = min(ans, dv)
print(ans)

A, B, M = [int(n) for n in input().split()]
a = [int(n) for n in input().split()]
b = [int(n) for n in input().split()]
ans = min(a) + min(b)
for m in range(M):
    x, y, c = [int(n) for n in input().split()]
    dv = a[x - 1] + b[y - 1] - c
    ans = min(ans, dv)
print(ans)

-ma = sorted(a)[0] -mb = sorted(b)[0] -ans = ma + mb +ans = min(a) + min(b)