#include <iostream>
using namespace std;
int main()
{
int n,a[199];
cin>>n;
for(int i=1;i<=n;i++)
cin>>a[i];
if(n==1)
{
if(a[1]==15)
cout<<"DOWN"<<endl;
if(a[1]==0)
cout<<"UP"<<endl;
if(a[1]>=1&&a[1]<=14)
cout<<"-1"<<endl;
}
if(n>1)
{
if(a[n]==15)
cout<<"DOWN"<<endl;
if(a[n]==0)
cout<<"UP"<<endl;
if(a[n-1]<a[n]&&a[n]<15)
cout<<"UP"<<endl;
if(a[n-1]>a[n]&&a[n]!=0)
cout<<"DOWN"<<endl;
}
return 0;
}
题上给的那一堆数字很重要啊,做的时候觉得自己挺对的,然后错了5次~~~~~