Read problems statements in Mandarin chinese, Russian and Vietnamese as well. 

Chef was reading a book. He decided to highlight all the lovely sentences of the book. He calls a sentence a lovely sentence if, after removing all the non-alphabetical characters (like punctuation and spaces) from it and converting all uppercase letters to lowercase, it is possible to choose four contiguous characters from the sentence and reorder them to create the string “chef”.

Chef has almost completed the highlighting work, only a few sentences are left to be checked and highlighted. Now, he wants your help in checking the remaining sentences, as he has to help his mother in the kitchen.

Each sentence s has already been preprocessed — all non-alphabetical characters have been erased and all remaining uppercase characters converted to lowercase. You should determine whether s is a lovely sentence or not. If it is a lovely sentence, then Chef is also interested in the number of possible ways to select 4 contiguous characters that can be reordered to give his name (the string "chef").

------ 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 and only line of each test case contains a single string s, denoting a preprocessed sentence.

------ Output ------ 

For each test case, print a single line.
If the string s is not a lovely string, this line should contain a single string “normal” (without quotes).
Otherwise, it should contain the string ”lovely” (without quotes) followed by one integer — the number of ways to select the four contiguous characters.

------ Constraints ------ 

$1 ≤ T ≤ 200,000$
$1 ≤ |s| ≤ 500,000$
$sum of |s| for all test cases ≤ 2,000,000$
$s contains only lowercase English letters$

------ Subtasks ------ 

Subtask #1 (20 points): 1 ≤ |s| ≤ 2000

Subtask #2 (80 points): original constraints

----- Sample Input 1 ------ 
5
ifchefisgoodforchess
fehcaskchefechohisvoice
hecfisaniceperson
letscallchefthefch
chooseaprogrammer
----- Sample Output 1 ------ 
lovely 2
lovely 3
lovely 1
lovely 3
normal
----- explanation 1 ------ 
Example case 1: We can select “fche” (the substring starting at index 2) or “chef” (index 3).
Example case 2: We can select “fehc” (index 1), “chef” (index 8) or “fech” (index 11).
Example case 3: We can only select “hecf” (index 1).
Example case 4: We can select “chef” (index 9), “hefc” (index 14), or “efch” (index 15).
Example case 5: No four contiguous characters can be reordered to form Chef's name.

Difficulty: EASY

Solutions:
for i in range(int(input())):
	s = input()
	a = 'cefh'
	c = 0
	for i in range(len(s) - 3):
		if s[i] == 'c' or s[i] == 'h' or s[i] == 'e' or (s[i] == 'f'):
			x = s[i:i + 4]
			y = ''.join(sorted(x))
			if y == a:
				c += 1
	if c > 0:
		print('lovely ' + str(c))
	else:
		print('normal')


for i in range(int(input())):
	s = input()
	k = 0
	for i in range(len(s) - 3):
		l = s[i:i + 4]
		if 'c' in l and 'h' in l and ('e' in l) and ('f' in l):
			k += 1
	if k == 0:
		print('normal')
	else:
		print('lovely', k)


def r2(num):
	return range(1, num + 1)
ii = lambda : int(input())
li = lambda : list(map(int, input().split()))
si = lambda : input()
ssi = lambda : list(input())
sepi = lambda : map(int, input().split())
seti = lambda : set(map(int, input().split()))
check = ['chef', 'chfe', 'cehf', 'cefh', 'cfhe', 'cfeh', 'hcef', 'hcfe', 'hecf', 'hefc', 'hfce', 'hfec', 'echf', 'ecfh', 'ehcf', 'ehfc', 'efch', 'efhc', 'fche', 'fceh', 'fhce', 'fhec', 'fech', 'fehc']
for i in range(int(input())):
	sentence = si()
	sentence = ''.join((i for i in sentence if i.isalpha())).lower()
	ans = 0
	for i in range(24):
		if check[i] in sentence:
			ans += sentence.count(check[i])
	if ans:
		print('lovely', ans)
	else:
		print('normal')


for _ in range(int(input())):
	s = input()
	c = 0
	n = 4
	if len(s) >= 4:
		for i in range(0, len(s) - n + 1):
			if ''.join(sorted(s[i:i + n])) == 'cefh':
				c += 1
	if c == 0:
		print('normal')
	else:
		print('lovely', c)


for _ in range(int(input())):
	s = input()
	c = 0
	for i in range(len(s) - 3):
		a = ['c', 'h', 'e', 'f']
		if s[i] in a:
			a.remove(s[i])
			if s[i + 1] in a:
				a.remove(s[i + 1])
				if s[i + 2] in a:
					a.remove(s[i + 2])
					if s[i + 3] in a:
						c += 1
	print('normal' if c == 0 else 'lovely ' + str(c))


t = int(input())
for i in range(t):
	s = str(input())
	ans = 'normal'
	lovely_str_count = 0
	for j in range(len(s) - 3):
		if 'c' in s[j:j + 4] and 'e' in s[j:j + 4] and ('f' in s[j:j + 4]) and ('h' in s[j:j + 4]):
			ans = 'lovely'
			lovely_str_count += 1
	if ans == 'normal':
		print('normal')
	else:
		print('lovely', lovely_str_count)


for T in range(int(input())):
	s = input()
	count = 0
	for i in range(0, len(s) - 3):
		if {s[i], s[i + 1], s[i + 2], s[i + 3]} == {'c', 'h', 'e', 'f'}:
			count += 1
	if count != 0:
		print('lovely', count)
	else:
		print('normal')


def fun(s):
	track = 0
	for i in range(0, len(s) - 3):
		if {s[i], s[i + 1], s[i + 2], s[i + 3]} == {'c', 'h', 'e', 'f'}:
			track += 1
	if track != 0:
		return f'lovely {track}'
	return 'normal'
n = int(input())
for i in range(n):
	s = input()
	print(fun(s))


from itertools import permutations
t = int(input())
for i in range(t):
	a = input()
	l = []
	m = []
	perm = permutations(['c', 'h', 'e', 'f'])
	s = ''
	for i in list(perm):
		l.append(s.join(i))
	for i in l:
		c = a.count(i)
		m.append(c)
	if sum(m) == 0:
		print('normal')
	else:
		print('lovely', sum(m))


for _ in range(int(input())):
	S = input().strip()
	words = {'c', 'h', 'e', 'f'}
	c = 0
	i = 0
	while i < len(S) - 3:
		if set([S[i], S[i + 1], S[i + 2], S[i + 3]]) & words == words:
			c += 1
		i += 1
	if c != 0:
		print('lovely', c)
	else:
		print('normal')