stopword = ''str = ''for line in iter(raw_input,stopword): str += line + '\n'L = str.strip().split('\n')L_num = []for c in L: L_num.append(int(c))L_down = L_num[:]L_up = L_num[:]L_down.sort(reverse = 1)L_up.sort()print 'L_down=',L_downprint 'L_up=',L_upif L_num == L_down: print "DOWN"elif L_num == L_up: print "UP"else: print "WRONG"