class Solution:
# @param {string[]} strs
# @return {string[]}
def anagrams(self, strs):
dict = {}
for word in strs:
sortedword = ''.join(sorted(word))
dict[sortedword] = [word] if sortedword not in dict else dict[sortedword] + [word]
res = []
for item in dict:
if len(dict[item]) > 1: res += dict[item]
return res