Problem: Sherlock Holmes found a mysterious correspondence of two VIPs and made up his mind to read it. But there is a problem! The correspondence turned out to be encrypted. The detective tried really hard to decipher the correspondence, but he couldn't understand anything. 

At last, after some thought, he thought of something. Let's say there is a word s, consisting of |s| lowercase Latin letters. Then for one operation you can choose a certain position p (1 ≤ p < |s|) and perform one of the following actions: 

  * either replace letter sp with the one that alphabetically follows it and replace letter sp + 1 with the one that alphabetically precedes it; 
  * or replace letter sp with the one that alphabetically precedes it and replace letter sp + 1 with the one that alphabetically follows it. 



Let us note that letter "z" doesn't have a defined following letter and letter "a" doesn't have a defined preceding letter. That's why the corresponding changes are not acceptable. If the operation requires performing at least one unacceptable change, then such operation cannot be performed.

Two words coincide in their meaning iff one of them can be transformed into the other one as a result of zero or more operations.

Sherlock Holmes needs to learn to quickly determine the following for each word: how many words can exist that coincide in their meaning with the given word, but differs from the given word in at least one character? Count this number for him modulo 1000000007 (109 + 7).

Input

The input data contains several tests. The first line contains the only integer t (1 ≤ t ≤ 104) — the number of tests.

Next t lines contain the words, one per line. Each word consists of lowercase Latin letters and has length from 1 to 100, inclusive. Lengths of words can differ.

Output

For each word you should print the number of different other words that coincide with it in their meaning — not from the words listed in the input data, but from all possible words. As the sought number can be very large, print its value modulo 1000000007 (109 + 7).

Examples

Input

1
ab


Output

1


Input

1
aaaaaaaaaaa


Output

0


Input

2
ya
klmbfxzb


Output

24
320092793

Note

Some explanations about the operation:

  * Note that for each letter, we can clearly define the letter that follows it. Letter "b" alphabetically follows letter "a", letter "c" follows letter "b", ..., "z" follows letter "y". 
  * Preceding letters are defined in the similar manner: letter "y" precedes letter "z", ..., "a" precedes letter "b". 
  * Note that the operation never changes a word's length. 



In the first sample you can obtain the only other word "ba". In the second sample you cannot obtain any other word, so the correct answer is 0.

Consider the third sample. One operation can transform word "klmbfxzb" into word "klmcexzb": we should choose p = 4, and replace the fourth letter with the following one ("b"  →  "c"), and the fifth one — with the preceding one ("f"  →  "e"). Also, we can obtain many other words from this one. An operation can transform word "ya" only into one other word "xb". 

Word "ya" coincides in its meaning with words "xb", "wc", "vd", ..., "ay" (overall there are 24 other words). The word "klmbfxzb has many more variants — there are 3320092814 other words that coincide with in the meaning. So the answer for the first word equals 24 and for the second one equals 320092793 — the number 3320092814 modulo 109 + 7

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
const int MAX_L = 2005;
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
const double eps = 1e-9;
const double pi = acos(-1);
using namespace std;
class bign {
 public:
  int len, s[MAX_L];
  bign();
  bign(const char *);
  bign(int);
  bool sign;
  string toStr() const;
  friend istream &operator>>(istream &, bign &);
  friend ostream &operator<<(ostream &, bign &);
  bign operator=(const char *);
  bign operator=(int);
  bign operator=(const string);
  bool operator>(const bign &) const;
  bool operator>=(const bign &) const;
  bool operator<(const bign &) const;
  bool operator<=(const bign &) const;
  bool operator==(const bign &) const;
  bool operator!=(const bign &) const;
  bign operator+(const bign &) const;
  bign operator++();
  bign operator++(int);
  bign operator+=(const bign &);
  bign operator-(const bign &) const;
  bign operator--();
  bign operator--(int);
  bign operator-=(const bign &);
  bign operator*(const bign &) const;
  bign operator*(const int num) const;
  bign operator*=(const bign &);
  bign operator/(const bign &) const;
  bign operator/=(const bign &);
  bign operator%(const bign &) const;
  bign factorial() const;
  bign Sqrt() const;
  bign pow(const bign &) const;
  void clean();
  ~bign();
};
bign::bign() {
  memset(s, 0, sizeof(s));
  len = 1;
  sign = 1;
}
bign::bign(const char *num) { *this = num; }
bign::bign(int num) { *this = num; }
string bign::toStr() const {
  string res;
  res = "";
  for (int i = 0; i < len; i++) res = (char)(s[i] + '0') + res;
  if (res == "") res = "0";
  if (!sign && res != "0") res = "-" + res;
  return res;
}
istream &operator>>(istream &in, bign &num) {
  string str;
  in >> str;
  num = str;
  return in;
}
ostream &operator<<(ostream &out, bign &num) {
  out << num.toStr();
  return out;
}
bign bign::operator=(const char *num) {
  memset(s, 0, sizeof(s));
  char a[MAX_L] = "";
  if (num[0] != '-')
    strcpy(a, num);
  else
    for (int i = 1; i < strlen(num); i++) a[i - 1] = num[i];
  sign = !(num[0] == '-');
  len = strlen(a);
  for (int i = 0; i < strlen(a); i++) s[i] = a[len - i - 1] - 48;
  return *this;
}
bign bign::operator=(int num) {
  if (num < 0)
    sign = 0, num = -num;
  else
    sign = 1;
  char temp[MAX_L];
  sprintf(temp, "%d", num);
  *this = temp;
  return *this;
}
bign bign::operator=(const string num) {
  const char *tmp;
  tmp = num.c_str();
  *this = tmp;
  return *this;
}
bool bign::operator<(const bign &num) const {
  if (sign ^ num.sign) return num.sign;
  if (len != num.len) return len < num.len;
  for (int i = len - 1; i >= 0; i--)
    if (s[i] != num.s[i])
      return sign ? (s[i] < num.s[i]) : (!(s[i] < num.s[i]));
  return !sign;
}
bool bign::operator>(const bign &num) const { return num < *this; }
bool bign::operator<=(const bign &num) const { return !(*this > num); }
bool bign::operator>=(const bign &num) const { return !(*this < num); }
bool bign::operator!=(const bign &num) const {
  return *this > num || *this < num;
}
bool bign::operator==(const bign &num) const { return !(num != *this); }
bign bign::operator+(const bign &num) const {
  if (sign ^ num.sign) {
    bign tmp = sign ? num : *this;
    tmp.sign = 1;
    return sign ? *this - tmp : num - tmp;
  }
  bign result;
  result.len = 0;
  int temp = 0;
  for (int i = 0; temp || i < (max(len, num.len)); i++) {
    int t = s[i] + num.s[i] + temp;
    result.s[result.len++] = t % 10;
    temp = t / 10;
  }
  result.sign = sign;
  return result;
}
bign bign::operator++() {
  *this = *this + 1;
  return *this;
}
bign bign::operator++(int) {
  bign old = *this;
  ++(*this);
  return old;
}
bign bign::operator+=(const bign &num) {
  *this = *this + num;
  return *this;
}
bign bign::operator-(const bign &num) const {
  bign b = num, a = *this;
  if (!num.sign && !sign) {
    b.sign = 1;
    a.sign = 1;
    return b - a;
  }
  if (!b.sign) {
    b.sign = 1;
    return a + b;
  }
  if (!a.sign) {
    a.sign = 1;
    b = bign(0) - (a + b);
    return b;
  }
  if (a < b) {
    bign c = (b - a);
    c.sign = false;
    return c;
  }
  bign result;
  result.len = 0;
  for (int i = 0, g = 0; i < a.len; i++) {
    int x = a.s[i] - g;
    if (i < b.len) x -= b.s[i];
    if (x >= 0)
      g = 0;
    else {
      g = 1;
      x += 10;
    }
    result.s[result.len++] = x;
  }
  result.clean();
  return result;
}
bign bign::operator*(const bign &num) const {
  bign result;
  result.len = len + num.len;
  for (int i = 0; i < len; i++)
    for (int j = 0; j < num.len; j++) result.s[i + j] += s[i] * num.s[j];
  for (int i = 0; i < result.len; i++) {
    result.s[i + 1] += result.s[i] / 10;
    result.s[i] %= 10;
  }
  result.clean();
  result.sign = !(sign ^ num.sign);
  return result;
}
bign bign::operator*(const int num) const {
  bign x = num;
  bign z = *this;
  return x * z;
}
bign bign::operator*=(const bign &num) {
  *this = *this * num;
  return *this;
}
bign bign::operator/(const bign &num) const {
  bign ans;
  ans.len = len - num.len + 1;
  if (ans.len < 0) {
    ans.len = 1;
    return ans;
  }
  bign divisor = *this, divid = num;
  divisor.sign = divid.sign = 1;
  int k = ans.len - 1;
  int j = len - 1;
  while (k >= 0) {
    while (divisor.s[j] == 0) j--;
    if (k > j) k = j;
    char z[MAX_L];
    memset(z, 0, sizeof(z));
    for (int i = j; i >= k; i--) z[j - i] = divisor.s[i] + '0';
    bign dividend = z;
    if (dividend < divid) {
      k--;
      continue;
    }
    int key = 0;
    while (divid * key <= dividend) key++;
    key--;
    ans.s[k] = key;
    bign temp = divid * key;
    for (int i = 0; i < k; i++) temp = temp * 10;
    divisor = divisor - temp;
    k--;
  }
  ans.clean();
  ans.sign = !(sign ^ num.sign);
  return ans;
}
bign bign::operator/=(const bign &num) {
  *this = *this / num;
  return *this;
}
bign bign::operator%(const bign &num) const {
  bign a = *this, b = num;
  a.sign = b.sign = 1;
  bign result, temp = a / b * b;
  result = a - temp;
  result.sign = sign;
  return result;
}
bign bign::pow(const bign &num) const {
  bign result = 1;
  for (bign i = 0; i < num; i++) result = result * (*this);
  return result;
}
bign bign::factorial() const {
  bign result = 1;
  for (bign i = 1; i <= *this; i++) result *= i;
  return result;
}
void bign::clean() {
  if (len == 0) len++;
  while (len > 1 && s[len - 1] == '\0') len--;
}
bign bign::Sqrt() const {
  if (*this < 0) return -1;
  if (*this <= 1) return *this;
  bign l = 0, r = *this, mid;
  while (r - l > 1) {
    mid = (l + r) / 2;
    if (mid * mid > *this)
      r = mid;
    else
      l = mid;
  }
  return l;
}
bign::~bign() {}
inline int Read() {
  int ret = 0;
  char c;
  bool sgn = false;
  c = getchar();
  while (c <= ' ') c = getchar();
  if (c == '-') sgn = true, c = getchar();
  for (ret = 0; c >= '0'; c = getchar()) ret = ret * 10 + (c - '0');
  if (sgn) ret = -ret;
  return ret;
}
inline int read() {
  char c = getchar();
  while (!isdigit(c)) c = getchar();
  int x = 0;
  while (isdigit(c)) {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x;
}
const int N = 110;
long long dp[N][3000];
int main() {
  memset(dp, 0, sizeof(dp));
  dp[0][0] = 1;
  for (int i = 0; i <= 100; i++) {
    for (int j = 0; j <= i * 26; j++) {
      for (int k = 0; k < 26; k++) {
        dp[i + 1][j + k] = (dp[i + 1][j + k] + dp[i][j]) % MOD;
      }
    }
  }
  int n;
  while (cin >> n) {
    getchar();
    string s;
    for (int i = 1; i <= n; i++) {
      cin >> s;
      int sum = 0;
      for (int i = 0; s[i]; i++) sum += s[i] - 'a';
      cout << dp[s.size()][sum] - 1 << endl;
    }
  }
  return 0;
}