
One day, the Scratch Cat decided to use his hacker skills to shut down all websites in Yuboland. There are
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 next
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
scratch.mit.edu
URLs that satisfy the conditions, but only one is output because they are the same website.
Comments