Woburn Challenge 2018-19 Round 1 - Junior Division
The computer science club at H.S. High School has just posted a special
list of five student names. These students have qualified to represent
the school at an upcoming programming competition, hosted by Ontario's
Organization for Computing Education (OOCE)! The -th name on this
team roster is , a non-empty string consisting of at most 20
lowercase letters (a
…z
), and all five names are distinct.
A certain student is looking at this team roster, and wants to see
whether or not they made the cut and will get to compete. This student's
name is , which is similarly a non-empty string consisting of at most
20 lowercase letters. Unfortunately, though their programming skills are
strong, their reading skills aren't so strong, so they're having trouble
looking for their name on the list. Help them determine whether or not
any of the five names on the team rosters are equal to their
own name . Output Y
if their name is present, or
N
if it isn't.
Input Specification
The first line of input consists of a single string, .
Five lines follow, the -th of which consists of a single string,
, for .
Output Specification
Output a single character, either Y
if any of the five names on the
team roster are equal to , or N
otherwise.
Sample Input 1
bob
alice
bob
christine
david
erika
Sample Output 1
Y
Sample Input 2
alice
frank
georgia
hans
ilia
james
Sample Output 2
N
Sample Explanation
In the first case, bob
is the second of the five names on the team
roster.
In the second case, alice
is not present on the team roster.
Comments