This page is still under construction.

Parts of this page are still being built. What you see may change.

Lining Up by Name

Time limit1sMemory limit256 MB

Summary
Check whether the given player names stand in increasing or decreasing dictionary order and print INCREASING, DECREASING, or NEITHER.
Level

Easy1 of 10

Topics
String, Array
Solved
No attempts yet

Problem

Coach Juhyuk likes to line his players up in name order, but he never says which order. Given the names of the players in the order they are standing, decide whether the names go up or down in dictionary order.

Two names are compared letter by letter from the front, and the first position where they differ decides the order. If one name matches the beginning of the other all the way to its end, the shorter name comes first.

Input

The first line contains the number of players NN. (2≤N≤202 \le N \le 20)

Each of the next NN lines contains one player name, in the order the players are standing. A name is 2 to 12 uppercase letters. No two names are the same.

Output

Print INCREASING on one line if the names go up in dictionary order, or DECREASING if they go down. If neither holds, print NEITHER.

Examples3

  1. Example 1

    Input
    5
    JOE
    BOB
    ANDY
    AL
    ADAM
    
    Expected output
    DECREASING
    
  2. Example 2

    Input
    11
    HOPE
    ALI
    BECKY
    JULIE
    MEGHAN
    LAUREN
    MORGAN
    CARLI
    MEGAN
    ALEX
    TOBIN
    
    Expected output
    NEITHER
    
  3. Example 3

    Input
    4
    GEORGE
    JOHN
    PAUL
    RINGO
    
    Expected output
    INCREASING