a={1} for b in b"`bM":a|={c*b for c in a} *_,=map(print,sorted(a)[1:47])