One day, the Scratch Cat decided to use his hacker skills to shut down all websites in Yuboland. There are websites available for him to hack. However, the Scratch Cat isn't intelligent enough to decide whether a website is hosted by Yuboland.
Therefore, he came up with a rule to determine that. The Scratch Cat believes that a website is hosted by Yuboland if
yubo
(all lowercase) is a substring of the website's URL,- The website is directly before or after a website that satisfies the first rule.
Please determine the websites that the Scratch Cat will hack in alphabetical order.
Constraints
Input Specification
The first line will contain an integer , the number of websites available for the Scratch Cat to hack.
The next lines will each contain a string , the URL for the website.
Output Specification
Output the URLs of the websites that the Scratch Cat will hack in alphabetical order. Do not output duplicate URLs.
Sample Input
5
dmoj.ca
scratch.mit.edu
yubosucks.scratch
scratch.mit.edu
canada.ca
Sample Output
scratch.mit.edu
yubosucks.scratch
Explanation
The second URL, scratch.mit.edu
, is directly before a URL containing yubo
as a substring. The third URL directly contains yubo
. The fourth URL is identical to the second and is directly after a URL containing yubo
. The sorted list of URLs is then scratch.mit.edu
, yubosucks.scratch
. Notice two scratch.mit.edu
URLs that satisfy the conditions, but only one is output because they are the same website.
Comments