Incredible Sums

Given an array of integers a0, a1, . . . , an, compute: Input  ∑  a a a a  mod (109 + 7) ijkl 1≤i<j<k<l≤n A number of test cases (≤ 200), one per line, each with n (0 ≤ n ≤ 100000), followed by an array of n integers, each integer ai (0 ≤ ai ≤ 1000000000), on the next line. Output For each test case, output the answer on one line. Sample Input 3 123 4 1234 Sample Output 0 24