const scale = require("fs").readFileSync(0,"utf8").toString().trim().split(' ').join('');
if(scale === '12345678') console.log("ascending");
else if(scale === '87654321') console.log("descending");
else console.log("mixed");