Question code: CLFIBD
My code: for i in range(int(input())): str1=input() l=list(str1) s=set(l) l2=[] if len(s)<3: print("Dynamic") else: for x in s: a=l.count(x) l2.append(a) l2.sort() b=len(l2) ans=True for y in range(0,b-2): if l2[y]+l2[y+1]==l2[y+2]: ans=ans and True else: ans=ans and False if ans ==True: print ("Dynamic") else: print ("Not")