for i in range(0,int(input())): L=input() if(L[len(L)//2-1] == L[len(L)//2]): print("Do-it") else: print("Do-it-Not")