Alice and Bob created $N$ and $M$ recipes, respectively ($N, M \ge 1$), and submitted them to Chef for evaluation. Each recipe is represented by a string containing only lowercase English letters. Let's denote Alice's recipes by $A_1, A_2, \ldots, A_N$ and Bob's recipes by $B_1, B_2, \ldots, B_M$.
Accidentally, Chef mixed up those recipes ― now, he has $L = N+M$ recipes in a sequence $S_1, S_2, \ldots, S_L$. Thankfully, the recipes created by Alice and Bob are distinguishable from each other. It is well-known that for each recipe $s$ created by Alice, the following property holds, and for each recipe created by Bob, it does not hold: For each $1 \le l < r \le |s|$, the substring $s_l, s_{l+1}, \ldots, s_r$ contains at least as many vowels as consonants. The letters 'a', 'e', 'i', 'o', 'u' are vowels, while the other letters are consonants.
The score of a candidate who made $K$ recipes is calculated as the product of $\frac{x_c}{fx_c^K}$ for all letters $c$ that occur in at least one of these recipes; here, $x_c$ is the number of recipes which contain the letter $c$ and $fx_c$ is the total number of occurrences of this letter in all $K$ recipes.
Let's denote the scores of Alice and Bob by $sc_A$ and $sc_B$ respectively. Chef wants to know their ratio $sc_A/sc_B$. We know that Chef is a legendary cook, but he is not very good at calculating, so he is asking you to find that number.

-----Input-----
- The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows.
- The first line of each test case contains a single integer $L$.
- $L$ lines follow. For each valid $i$, the $i$-th of these lines contains a single string $S_i$.

-----Output-----
For each test case, if the ratio of scores exceeds $10^7$, print a single line containing the string "Infinity" (without quotes); otherwise, print a single line containing one real number $sc_A/sc_B$.
Your answer will be considered correct if its absolute or relative error does not exceed $10^{-6}$. It is guaranteed that $sc_A/sc_B$ does not lie in the range $10^7 \pm 10$.

-----Constraints-----
- $1 \le T \le 10^5$
- $2 \le L \le 10^5$
- $2 \le |S_i| \le 10^5$ for each valid $i$
- for each valid $i$, $S_i$ contains only lowercase English letters
- the sum of $|S_1| + |S_2| + \ldots + |S_L|$ over all test cases does not exceed $10^7$

-----Subtasks-----
Subtask #1 (25 points):
- $L \le 10$
- $|S_i| \le 10$ for each valid $i$
Subtask #2 (75 points): original constraints

-----Example Input-----
2
4
aba
abc
bab
aac
3
aba
baab
abc

-----Example Output-----
1.1250000
0.0277778

-----Explanation-----
Example case 1: The recipes "aba" and "aac" are created by Alice, while the recipes "abc" and "bab" are created by Bob. The scores are:
- $sc_A = \frac{x_a}{fx_a^N} \cdot \frac{x_b}{fx_b^N} \cdot \frac{x_c}{fx_c^N} = \frac{2}{4^2} \cdot \frac{1}{1^2} \cdot \frac{1}{1^2} = \frac{1}{8}$
- $sc_B = \frac{x_a}{fx_a^M} \cdot \frac{x_b}{fx_b^M} \cdot \frac{x_c}{fx_c^M} = \frac{2}{2^2} \cdot \frac{2}{3^2} \cdot \frac{1}{1^2} = \frac{1}{9}$
- $\frac{sc_A}{sc_B} = \frac{1/8}{1/9} = 1.125$

Difficulty: HARD

Solutions:
from math import log

def bob(s, f2, x2):
	for c in x2.keys():
		if c in s:
			x2[c] += 1
	for C in s:
		if f2[ord(C) - 97] == 0:
			x2[C] = 1
		f2[ord(C) - 97] += 1

def alice(s, f1, x1):
	for c in f1.keys():
		if c in s:
			x1[ord(c) - 97] += 1
	for C in s:
		if C not in f1.keys():
			x1[ord(C) - 97] = 1
			f1[C] = 0
		f1[C] += 1
T = int(input())
vowels = ['a', 'e', 'i', 'o', 'u']
for _ in range(T):
	(f1, f2, x1, x2) = (dict(), [0] * 26, [0] * 26, dict())
	n = 0
	L = int(input())
	for h in range(L):
		s = str(input())
		pos = -3
		for i in range(len(s)):
			if s[i] not in vowels:
				if i - pos < 3:
					bob(s, f2, x2)
					break
				pos = i
		else:
			if len(s) == 1 and s[0] not in vowels:
				bob(s, f2, x2)
			else:
				n += 1
				alice(s, f1, x1)
	(X1, X2, F1, F2) = (1, 1, 1, 1)
	for c in f1.keys():
		X1 *= x1[ord(c) - 97]
		F1 *= f1[c]
	for c in x2.keys():
		X2 *= x2[c]
		F2 *= f2[ord(c) - 97]
	LHS = log(X1) + (L - n) * log(F2) - log(X2) - n * log(F1)
	if LHS > log(10 ** 7):
		print('Infinity')
	else:
		print('{0:.7f}'.format(X1 / X2 * (F2 ** (L - n) / F1 ** n)))


import math

def check(ch):
	return ch not in 'aeiou'

def find(s):
	j = 0
	for i in range(len(s)):
		if check(s[i]):
			j = i
			break
	for i in range(i + 1, len(s)):
		if check(s[i]):
			if i - j < 3:
				return False
			j = i
	return True
for _ in range(int(input())):
	n = int(input())
	l = []
	(a, b) = ([], [])
	for __ in range(n):
		s = input()
		if find(s):
			a.append(s)
		else:
			b.append(s)
	k1 = len(a)
	k2 = len(b)
	(ra, rb) = (1, 1)
	(la, lb) = (0.0, 0.0)
	for ch in 'qwertyuiopasdfghjklzxcvbnm':
		(x, fx) = (0, 0)
		for s in a:
			if ch in s:
				x += 1
				fx += s.count(ch)
		if x > 0:
			la += math.log10(x) - k1 * math.log10(fx)
		(y, fy) = (0, 0)
		for s in b:
			if ch in s:
				y += 1
				fy += s.count(ch)
		if y > 0:
			lb += math.log10(y) - k2 * math.log10(fy)
	if la - lb > 7.0:
		print('Infinity')
	else:
		print('{0:.7f}'.format(pow(10, la - lb)))
	pass