The ECOO programming contest is coming up soon and it's about time to determine which teams will represent Mackenzie at ECOO. Siavash is curious if his team will be one of these teams. Help him determine the teams that will go to ECOO. Each school is able to send 2 general teams and 1 girls team. Any team type can qualify as a general team, but only girls teams can compete as a girls team. We will send the *best* teams possible from our school. To determine the best teams, we host the JDCC competitions. The higher a team's JDCC score, the better they are considered as a team at programming. Given all the team names, their scores on the JDCC and their team type (`general`

or `girls`

), output the name(s) of the team(s) representing Mackenzie at ECOO, in alphabetical order. If zero teams will represent Mackenzie, output `No ECOO :(`

.

#### Input Specification

Input will begin with an integer , denoting teams.

The next lines will contain , , , all separated by a single space. is the team name, all uppercase letters only, at most 20 letters long. is the team type, either `general`

or `girls`

. And is the number of points that the team has . No two teams will have an equal number of points and no two teams will have the same team name.

#### Output Specification

The teams to send to ECOO in alphabetical order, each on a separate line, or `No ECOO :(`

on a single line if no teams are to be sent.

#### Sample Input

```
6
A general 1001
H girls 849
G girls 850
B general 999
C general 950
D general 951
```

#### Sample Output

```
A
B
G
```

#### Explanation for Sample Output

Team G is the highest scoring girls team, so they will advance to ECOO. A and B are the two highest scoring general teams, so they also go to ECOO. A, B and G are the three teams that will go in alphabetical order.

## Comments

Can someone please tell me why I'm getting 4/5. I read the problem many times and I still can't figure it out.Or can someone please give me a hint.

Edge cases :D Consider cases where there are

veryfew teams and cases where there are only acertainamount of the types of teams.Is the score definetly integer?

Yes.

Username relevant.

if there is no girl team, do we print "No ECOO :(" at the end with other two teams at the top?

Only print

`No ECOO :(`

if no (zero) teams will go to ECOO.Problem statement updated for better clarification.

If there were two teams, both of which were general, does that mean that there is No ECOO because it doesn't satisfy the condition of having at least 1 girl team?

Emphasis on

ableEmphasis on

no teamsyes.

:)

Fixed the problem statement. (Oh, so it was 1,000,000)

4 A general 10 B general 20 C girls 500 D girls 499

Use your judgement.

and

In Test Case #7, at least two teams have the same score.

Thanks for notifying us. The issue has been resolved. Submissions rejudged. Sorry for the inconvenience.

Test data has been fixed, all submissions have been rejudged.