while 1:a,b=raw_input().split();print" ".join(j+i for j in a for i in b)