시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 256 MB 317 232 214 75.352%

문제

악독한 코치 주혁은 선수들을 이름 순으로 세우는 것을 좋아한다. 더 악독한 것은 어떤 순서로 서야할지도 알려주지 않았다! 선수들의 이름이 주어질 때 어떤 순서로 이루어져있는지 확인해보자.

입력

첫째 줄에 N개의 이름이 주어진다. (2 ≤ N ≤ 20)

다음 N개의 줄에는 각 선수들의 이름이 주어진다. 이름은 2 이상 12 이하의 대문자로만 이루어져있다. 선수의 이름은 중복되지 않는다.

출력

이름이 증가하는 순으로 나타나면 INCREASING, 감소하는 순이면 DECREASING을 한 줄에 출력한다. 만약 위의 두 경우가 아니라면 NEITHER를 출력한다.

예제 입력 1

5
JOE
BOB
ANDY
AL
ADAM

예제 출력 1

DECREASING

예제 입력 2

11
HOPE
ALI
BECKY
JULIE
MEGHAN
LAUREN
MORGAN
CARLI
MEGAN
ALEX
TOBIN

예제 출력 2

NEITHER

예제 입력 3

4
GEORGE
JOHN
PAUL
RINGO

예제 출력 3

INCREASING
W3sicHJvYmxlbV9pZCI6IjExNTM2IiwicHJvYmxlbV9sYW5nIjoiMCIsInRpdGxlIjoiXHVjOTA0IFx1YzEzOFx1YzZiMFx1YWUzMCIsImRlc2NyaXB0aW9uIjoiPHA+XHVjNTQ1XHViM2M1XHVkNTVjIFx1Y2Y1NFx1Y2U1OCBcdWM4ZmNcdWQ2MDFcdWM3NDAgXHVjMTIwXHVjMjE4XHViNGU0XHVjNzQ0Jm5ic3A7XHVjNzc0XHViOTg0IFx1YzIxY1x1YzczY1x1Yjg1YyBcdWMxMzhcdWM2YjBcdWIyOTQmbmJzcDtcdWFjODNcdWM3NDQgXHVjODhiXHVjNTQ0XHVkNTVjXHViMmU0LiBcdWIzNTQgXHVjNTQ1XHViM2M1XHVkNTVjIFx1YWM4M1x1Yzc0MCBcdWM1YjRcdWI1YTQgXHVjMjFjXHVjMTFjXHViODVjIFx1YzExY1x1YzU3Y1x1ZDU2MFx1Yz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