The C major scale consists of 8 tones: c, d, e, f, g, a, h, 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 whether the scale was played ascending, descending or mixed.
Input
The first and only line of input contains $8$ integers, from $1$ to $8$ inclusive. Each integer appears 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.
Example 1
1 2 3 4 5 6 7 8
ascending
Example 2
8 7 6 5 4 3 2 1
descending
Example 3
8 1 7 2 6 3 5 4
mixed
Discussion
Threads about this problem. Spoilers are collapsed; wrap hints in
||double bars||.No discussion yet. Start a thread if something here needs explaining.