# your code goes here
import sys
input = sys.stdin.readline 

roof = int(input().rstrip())
line = list(map(int, input().rstrip().split()))

order = min(line)
stack = []

for _ in line:
    if order == _:
        line.remove(order)
        order = min(line)
        pass
    elif order != _:
        stack.append(_)

stack_validation = sorted(stack, reverse = True)

if stack_validation == stack:
    print("Nice")
else:
    print("Sad")