Go Back
Rarity Calculator (100)
Description

Barath and Mithil started playing Brawl Stars together, but Mithil is not able to get brawlers so he decided to write a program to find rarity of brawler he get next in which he needs your help. He has to open brawl boxes to get brawlers. Each brawl box opened will give a value. When values from all the boxes are added, it tells the rarity of next brawler he gets. If the total number is more than 75 he will get a legendary brawler, if it is more than 50 and less than or equal to 75 he will get a mythical brawler. Again if total value is more than 25 and less than or equal to 50 he will get an epic brawler and if value is less than or equal to 25 he will not get a new brawler.

Input

First line of the input consists of a number T denoting the number of test cases
Second line will have a number B denoting the number of boxes
Third line will consist of B space-separated integers denoting the values obtained from each box a1, a2, a3, …, aB.

Output

Print-
N if he gets no brawler.
E if he gets an epic brawler
M if a mythical brawler
and
L if he gets a legendary brawler.

Constraints

0< T <100
0< B <1000
0< a1, a2, a3….aB <75

Example
Copy Input

Input:
4
4
1 4 6 2
5
10 5 6 5 5
3
25 25 5
4
40 40 10 15


Output:
NEML

Explanation

Case 1 – the values he got were 1,4,6,2 which after adding became 13, which was less than 25 so he didn’t get a brawler.
Case 2 – the values he got were 10, 5, 6, 5, 5, which on adding became 31 which was more than 25 so he got an epic brawler

Single Round Match #08
3 hour contest



Announcement

Problem Tags
adhoc

Supported by our Coding Partner