s1=input()
s2=input()
l=[0]*26
for i in s1:
    l[ord(i)-97]+=1 #l[i]=a l[97-97]=1
for i in s2:
    l[ord(i)-97]+=1  
flag=0    
for i in l:
    if(i%2!=0): 
        flag=1
        break
if(flag==0):
    print("anagaram")
else:
    print("Not an anagram")

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: