FINDPROB - Find New SPOJ Problems

After solving several problems on SPOJ you quickly browse to the ranking page to look at all the competitors you have overtaken. While looking at their account pages you see lots of new problems. It is too hard to remember all the problem names, so you must write a script that generates a lists of new problems for you to solve.

Input

The input begins with the HTML source of your SPOJ account page.
The following line contains a number (C<100), which represents the number of SPOJ competitors to consider.
The remainder of the input consists of the HTML source of the (C) competitors' account pages.

Output

Print a list of problem codes you have not yet attempted that a competitor has solved.
Sort the list by the number of competitors that have solved the problem, then alphabetically to break ties.

Example

Input:  Preview
Output:  Preview

Score

Your CPU is old and can only store 512 characters. Minimize your source length.


Added by:Jared Deckard
Date:2012-04-19
Time limit:0.100s
Source limit:512B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All
Resource:Review the account page source code.

hide comments
2016-03-21 20:40:57


Last edit: 2016-03-21 20:45:26
2014-01-25 15:28:03 karan173
Any tricky cases to consider? Program works fine on sample case.

Last edit: 2014-01-25 15:38:10
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.