#include <stdio.h> int main() { int n = 0, m = 0, i = 0; int count1 = 0, count2 = 0; scanf("%d", &n); int arr[100] = { 0 }; for (i = 0; i < n; i++) { scanf("%d", &arr[i]); } for (i = 0; i < n-1; i++) { if (arr[i]-arr[i + 1]>=0) { count1++; } else if (arr[i] - arr[i+1]<=0) { count2++; } } if (count1 == n - 1 || count2 == n - 1) { printf("sorted\n"); } else printf("unsorted\n"); return 0; }