fork download
  1. # your code goes here
  2. T=int(input())
  3. for c in range(T):
  4. a,b,c=map(int,input().split())
  5. if a<b and b<c:
  6. print("STAIR")
  7. elif a<b and b>c:
  8. print("PEAK")
  9. else:
  10. print("NONE")
Success #stdin #stdout 0.03s 9708KB
stdin
7
1 2 3
3 2 1
1 5 3
3 4 1
0 0 0
4 1 7
4 5 7
stdout
STAIR
NONE
PEAK
PEAK
NONE
NONE
STAIR