SP16487 UPDATEIT - Update the array !

Description

You have an array containing n elements initially all 0. You need to do a number of update operations on it. In each update you specify l, r and val which are the starting index, ending index and value to be added. After each update, you add the 'val' to all elements from index l to r. After 'u' updates are over, there will be q queries each containing an index for which you have to print the element at that index.

Input Format

First line consists of t, the number of test cases. (1

Output Format

For each test case, output the answers to the corresponding queries in separate lines.