B2-Sequence*CPE48-23
t=0
while 1:
try:
if t>0:
space=input()
t+=1
T=input()
arr=list(map(int,input().split()))
ans=[]
c=0
for i in range(len(arr)-1):
if abs(arr[i]-arr[i+1]) not in ans:
ans.append(abs(arr[i]-arr[i+1]))
else:
c=1
break
if c==0:
print('Case #'+str(t)+': It is a B2-Sequence.')
else:
print('Case #'+str(t)+': It is not a B2-Sequence.')
print()
except:
break