https://www.acmicpc.net/problem/2920
a=list(map(int,input().split()))
b=0;
if a[0]==1:
for i in range(2,9):
if a[i-1]!=i:
b+=1
print("mixed")
break
if b==0:
print("ascending")
elif a[0]==8:
for i in range(2,9):
if a[i-1]!=9-i:
b+=1
print("mixed")
break
if b==0:
print("descending")
else:
print("mixed")