https://www.acmicpc.net/problem/2920
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner s=new Scanner(System.in);
int x=1;
int y=8;
int b=0;
int a=s.nextInt();
if(a==1){
for(int i=2;i<=8;i++){
a=s.nextInt();
x++;
if(x!=a){
System.out.println("mixed");
b++;
break;
}
}
if(b==0) System.out.println("ascending");
}
else if(a==8){
for(int i=7;i>=1;i--){
a=s.nextInt();
y--;
if(y!=a) {
System.out.println("mixed");
b++;
break;
}
}
if(b==0) System.out.println("descending");
}
else System.out.println("mixed");
}
}