Toni was walking through the wild CIn parking lot, dodging beasts and trying to find where he parked his car when he stumbled upon a formidable object: a stick of exact integer length $$$n$$$.
Like any good problem-solver, Toni's mind immediately thought of a "gambiarra" (a makeshift solution). He needs to build a support base for his new hardware project. For the base to be stable, he needs to form a perfect triangle using pieces of this stick.
However, Toni is exhausted after a coding marathon. He decides to cut the stick at two distinct points, chosen completely at random. He only has energy for these two cuts.
Your mission is to calculate the chances of Toni's plan working, so he knows whether or not to give up and go grab a coffee.
Formally, we have a line segment of length $$$n$$$. The set of possible cut points consists of the internal integer coordinates $$$\{1, 2, \dots, n-1\}$$$.
Toni chooses two distinct cut points from this set, uniformly at random. This divides the original stick into three pieces with positive integer lengths $$$a$$$, $$$b$$$, and $$$c$$$ (such that $$$a+b+c = n$$$).
What is the probability that these three resulting pieces ($$$a, b, c$$$) can form a non-degenerate triangle (i.e., a triangle with an area greater than zero)?
Since the answer can be an irreducible fraction $$$\frac{p}{q}$$$, you must print the value of $$$p \cdot q^{-1} \pmod{10^9 + 7}$$$, where $$$q^{-1}$$$ is the modular inverse of $$$q$$$ modulo $$$10^9 + 7$$$.
The first line of the input contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each of the following $$$t$$$ lines contains a single integer $$$n$$$ ($$$3 \le n \le 10^9$$$), representing the length of the stick Toni found in that specific scenario.
For each test case, print a single integer on a new line: the probability of the makeshift solution working, modulo $$$10^9+7$$$.
5345712
10500000004800000006636363641