Under construction

Still being built. Things may change

Global Phoenix

Time limit1sMemory limit1024 MB

Summary
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 S1S_1, S2S_2, S3S_3 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.

Examples3

  1. Example 1

    Input
    korea
    legend
    postech
    
    Expected output
    GLOBAL
    
  2. Example 2

    Input
    turing
    dijkstra
    neumann
    
    Expected output
    PONIX
    
  3. Example 3

    Input
    leo020630
    kwoncycle
    petamingks
    
    Expected output
    GLOBAL