时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
            空间限制:C/C++/Rust/Pascal 128 M,其他语言256 M
             64bit IO Format: %lld
        
     
    题目描述
        
        
    
            
            Chiaki is interested in an infinite sequence a
1, a
2, a
3, ..., which defined as follows:  
%5E%7B%5Cfrac%7Bn(n%2B1)%7D%7B2%7D%7D%20%26%20n%20%5Cge%202%5Cend%7Bcases%7D)
 Chiaki would like to know the sum of the first n terms of the sequence, i.e. 

. As this number may be very large, Chiaki is only interested in its remainder modulo (10
9 + 7).
 
                            输入描述:
                                                    There are multiple test cases. The first line of input contains an integer T (1 ≤ T ≤ 105), indicating the number of test cases. For each test case:
The first line contains an integer n (1 ≤ n ≤ 1018).
                                                                            输出描述:
                                                    For each test case, output an integer denoting the answer.