Computer Hit by Gamma Rays
Time limit1sMemory limit1024 MB
Given a 15x15 grid of pixel colors, print which cat the photo belongs to based on whether it contains w, b, or g.
- Level
Easy1 of 10
- Topics
- Implementation
- Solved
- No attempts yet
Problem
Chunbae, Nabi, and Yeongcheol nearly got hit by gamma rays from a UFO that appeared on Earth one day. Luckily, the rays hit a computer beside some cats lying happily around. But the pixels of the friends' precious photos stored on that computer were all mixed together.
The cats are sad to see the photos unrecognizable, so they decided to have a photo restoration expert recover them. Chunbae did not want other cats to see their photos, so before handing them over, Chunbae asked you to write a program that sorts the photos.
The program must determine which cat each given photo belongs to. If the photo contains white (w), it belongs to Chunbae. If it contains black (b), it belongs to Nabi. If it contains gray (g), it belongs to Yeongcheol. A photo is made of cats (w, b, g) or background (r, o, y, p), and each photo contains exactly one cat.
Input
The input has 15 lines. Each line contains 15 pixel colors of the scrambled photo, separated by spaces.
Output
Print chunbae if the photo belongs to Chunbae, nabi if it belongs to Nabi, and yeongcheol if it belongs to Yeongcheol.


