# 1201.py class monomio (str): def __mul__ (A,B): return ''.join(sorted(A+B)) a=monomio('xyxxz') b=monomio('yxx') print a*b # xxxxxyyz