for i in t:
    if i not in chars:
        return False
else:
    chars[i] -= 1
if chars[i] < 0:
    return False
for i in chars:
    if chars[i] != 0:
        return False
return True
Find group of strings that are anagrams