The first line contains the size of the sequences, N (1≤N≤100000).
The second line contains A1,A2,…,AN. (1≤Ai≤100000)
The third line contains B1,B2,…,BN. (1≤Bi≤100000)
The fourth line contains the number of queries, M (1≤M≤100000).
Each of the next M lines contains one query i, j, k. (1≤i≤j≤N, 1≤k≤100000)