while 1:a,b=raw_input().split();print' '.join(c+d for c in a for d in b)