#include<iostream>
using namespace std;
int main()
{
int a1,a2,a3,a4,a5,a6,a7,a8;
cin>>a1>>a2>>a3>>a4>>a5>>a6>>a7>>a8;
if(a1==1&&a2==2&&a3==3&&a4==4&&a5==5&&a6==6&&a7==7&&a8==8)
cout<<"ascending"<<endl;
else if(a1==8&&a2==7&&a3==6&&a4==5&&a5==4&&a3==6&&a2==7&&a1==8)
cout<<"descending"<<endl;
else
cout<<"mixed"<<endl;
return 0;
}
why it fails on the 5th test?