#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    long long int n = 10 - t;
    cin >> n;
    __int128 ans = (n / 2 + 2);
    ans *= ans;
    ans /= 4;
    ans %= 1000000007;
    long long int x = ans;
    cout << x << "\n";
  }
  return 0;
}
