for(;[a,b]=readline().split(' ');)print([a[x]+b[y]for(x in a)for(y in b)].join(' '))