Problem list
Log in
#coci00109 · COCI 2009/2010 Contest 1

Note

Bronze II 1.0 s 32 MB

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

Input
1 2 3 4 5 6 7 8
Output
ascending

Example 2

Input
8 7 6 5 4 3 2 1
Output
descending

Example 3

Input
8 1 7 2 6 3 5 4
Output
mixed
Source
COCI 2009/2010 Contest 1
Appears in
Not part of a ladder, contest or set yet.
Accepted 1 Submissions 3 Acceptance 100% Solvers 1

Discussion

Threads about this problem. Spoilers are collapsed; wrap hints in ||double bars||.

No discussion yet. Start a thread if something here needs explaining.

Recent submissions Open with filters
Code