#include <bits/stdc++.h> #define ll long long int #define ld long double using namespace std; ll mod = 1e9 + 7; ll power(ll x, ll n) { ll ans = 1; while (n != 0) { if (n % 2 == 1) ans = (ans * x) % mod; x = (x * x) % mod; n /= 2; } return ans % mod; } void mainSolve() { int n; string s; cin >> n >> s; int count = 0; vector<int> vowels = {'a', 'e', 'i', 'o', 'u'}; for (char x : s) { if (x == 'a' || x == 'e' || x == 'i' || x == 'o' || x == 'u') continue; int min_dis = 26; for (char v : vowels) min_dis = min(min_dis, abs(x - v)); int choice = 0; for (char v : vowels) { int curr = abs(x - v); if (curr == min_dis) ++choice; } count += (choice == 2); } ll ans = power(2, count); cout << ans << endl; } int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif int t; cin >> t; while (t--) { mainSolve(); } return 0; }