Shubham recently learned the lexicographical order in strings.

Now, he has two strings s1  and  s2  of the equal size and Shubham wants to compare those two strings lexicographically.

Help Shubham with the strings comparison.

Note:

Letters are case insensitive. 


-----Input-----

First line contains a integer T denoting the number of test cases. Each test case contains two strings of equal size in two separate lines.

-----Output-----

For each test case,

If s1 < s2, print "first".

If s1 > s2, print "second".

If s1=s2, print "equal".


in separate lines.

-----Constraints-----

- 1 ≤ T ≤ 10^2
- 1 ≤ Length of the string ≤ 500

-----Example-----
Input:
2
abc
acb
AB
ba

Output:
first
first

Difficulty: UNKNOWN_DIFFICULTY

Solutions:
t = eval(input())
while t:
	t = t - 1
	s1 = input().lower()
	s2 = input().lower()
	res = 'equal'
	for i in range(len(s1)):
		if s1[i] != s2[i]:
			res = 'first' if s1[i] < s2[i] else 'second'
			break
	print(res)


import sys
for __ in range(eval(input())):
	(a, b) = (input().lower(), input().lower())
	if a > b:
		print('second')
	elif a < b:
		print('first')
	else:
		print('equal')


def compare(a, b):
	return ord(a.lower()) - ord(b.lower())
for test in range(eval(input())):
	A = input()
	B = input()
	length = len(A)
	diff = 0
	for i in range(length):
		diff = compare(A[i], B[i])
		if diff == 0:
			continue
		else:
			break
	if diff < 0:
		print('first')
	elif diff > 0:
		print('second')
	else:
		print('equal')


t = int(input())
for i in range(0, t):
	s1 = input().lower()
	s2 = input().lower()
	if s1 < s2:
		print('first')
	elif s1 > s2:
		print('second')
	else:
		print('equal')


for t in range(eval(input())):
	(s, t) = (input(), input())
	s = s.lower()
	t = t.lower()
	if s < t:
		print('first')
	elif s > t:
		print('second')
	else:
		print('equal')


cases = int(input())
for i in range(0, cases):
	s1 = input()
	s2 = input()
	counter = 0
	s1 = s1.lower()
	s2 = s2.lower()
	for i in range(0, len(s1)):
		if s1[i] < s2[i]:
			print('first')
			break
		elif s1[i] > s2[i]:
			print('second')
			break
		else:
			counter += 1
	if counter == len(s1):
		print('equal')


t = eval(input())
while t:
	s1 = input()
	s2 = input()
	s1 = s1.lower()
	s2 = s2.lower()
	if s1 < s2:
		print('first')
	elif s1 > s2:
		print('second')
	else:
		print('equal')
	t = t - 1


n = int(input())
while n > 0:
	s1 = input()
	s2 = input()
	if s1.lower() < s2.lower():
		print('first')
	elif s1.lower() > s2.lower():
		print('second')
	elif s1.lower() == s2.lower():
		print('equal')
	n -= 1