P18363 [CodeChef] CDFX01
普及
题目描述

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

输入格式

见题面

输出格式

见题面

样例输入
['2', 'abc', 'acb', 'AB', 'ba']
样例输出
['first', 'first']