COCI 2009/2010, Contest #1

Task NOTE

C major scale consists of 8 tones: c d e f g a b C. For this task we number the notes using numbers 1 through 8. The scale can be played ascending, from 1 to 8, descending, from 8 to 1, or mixed. Write a program that, given the sequence of notes, determines wether the scale was played ascending, descending or mixed.

Input

First and only line of input will contain 8 integers, from 1 to 8 inclusive. Each integer will appear exactly once in the input.

Output

In the first and only line of input print "descending" if the scale was played descending, "ascending" if the scale was played ascending and "mixed" if the scale was played mixed.

Examples

Input

1 2 3 4 5 6 7 8

Output

ascending

Input

8 7 6 5 4 3 2 1

Output

descending

Input

8 1 7 2 6 3 5 4

Output

mixed

All Submissions
Best Solutions


Point Value: 3
Time Limit: 1.00s
Memory Limit: 32M
Added: Jul 02, 2013

Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3

Comments (Search)

Can someone pls help?

C++ arrays are 0-based, not 1-based.


The input is on one line. int(input()) only reads an integer if it is on a line byitself (or else you get an error). Try finding a way to read multiple integers on the same line (like using map).