scale = ''.join(input().split()) print("ascending" if scale=="12345678" else "descending" if scale=="87654321" else "mixed")