THANKS - Thank you Chief ;)
The exams are over. You and your batch-mates are over the moon, especially after cracking the Calculus paper. Chief, your popularity is soaring and your batch-mates are going ga-ga about you. As a thanking gesture, they send you Thank you messages. Overwhelmed about this, you decide to reply back to all of them. You are keen to start dating one of your batch-mates and don't want to miss this opportunity. We leave at that Chief, hoping that you will soon find a date .
Input
The first line of the input contains two space-separated integers T( the number of messages you received) and G (0 for boy, 1 for girl) which indicates your gender. T lines follow. Each line starts with the name of the sender Si, followed by a space and than an integer Gi(gender of the sender).
Output
Output exactly T lines. Each line should be of the following format: "Welcome Si" or "Welcome Si, ;)" depending on whether the sender and you are of the same gender or opposite gender.
Constraints
1 <= T <= 1000, Length of Si won't exceed 15 characters and there will be no spaces in the name.
Example
Input: 4 0 Avani 1 Parth 0 Hena 1 Rohan 0 Output: Welcome Avani, ;) Welcome Parth Welcome Hena, ;) Welcome Rohan
hide comments
SDU_Phonism:
2012-03-11 01:59:04
wrong answer why!!! |
|
BOND:
2011-08-13 05:22:16
:P |
|
neerajcrespo:
2011-01-22 19:25:54
ye toh pura hindi drama lagta hai.. ha ha |
|
.::Manish Kumar::.:
2010-11-10 15:10:34
hey bhagwan..hahahhaha |
Added by: | Siddharth Kothari |
Date: | 2010-09-27 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: NODEJS OBJC VB.NET |
Resource: | Own problem |