Global Phoenix
Time limit1sMemory limit1024 MB
Given three strings, check whether they can be ordered so that they start with l, k, and p respectively, and print GLOBAL or PONIX.
- Level
Easy2 of 10
- Topics
- String, Implementation
- Solved
- No attempts yet
Problem
As everyone knows, Phoenix is the mascot of POSTECH, the university that creates value for human life. Phoenix always works to create new value that is GLOBAL.
In computer science, a GLOBAL value is, without doubt, advancing to the ICPC World Finals. Phoenix wants to make a cheer phrase for POSTECH's advancement to the ICPC World Finals. The cheer phrase consists of three strings. According to Phoenix's big data research, POSTECH can advance to the ICPC World Finals if the three strings, in any order, start with l, k, and p respectively. Phoenix decided to call such a cheer phrase a GLOBAL phrase.
Given three strings chosen by Phoenix, determine whether the cheer phrase is GLOBAL.
Input
The three strings , , are given on the first three lines. Each string consists of lowercase letters or digits and has a length of at most 20.
Output
Print GLOBAL if the cheer phrase made from the three strings is GLOBAL. Otherwise, print PONIX.