def solve(N, S, C, MAP, Q, Y): def route(f, t): v = [0] * (N + 1) stack = [f] while stack: i = stack.pop() for j in MAP[i]: if not v[j]: v[j] = i if j == t: break stack.append(j) r = [] while t != f: r.append(t) t = v[t] r.append(f) return r for y in Y: f = y[1] t = y[2] r = route(f, t) if y[0] == 1: print(sum(S[i - 1] for i in r)) elif y[0] == 0: z = y[3] for i in r: S[i - 1] += C[i - 1] * z def main(): N = int(input()) S = list(map(int, input().split())) C = list(map(int, input().split())) MAP = [[] for f in range(N + 1)] for i in range(N - 1): a, b = list(map(int, input().split())) MAP[a].append(b) MAP[b].append(a) Q = int(input()) Y = [None] * Q for i in range(Q): Y[i] = list(map(int, input().split())) solve(N, S, C, MAP, Q, Y) if __name__ == '__main__': main()