T = int(input()) s = [] b = 0 for i in range(T): a = input() s.append(int(a)) for i in range(T-1): if abs(N[i] - N[i+1]) != 1: b += 1 if b == 0: print(True) else: print(False)