a,b=raw_input().split() p=len(a) q=len(b) print b*(p