c='' while''==c: c=1;z=[];y=[] while c: try:c=raw_input() except:c=0 if c:d,e=c.split(' ');z.append(map(int,d.split()));y.append(map(int,e.split())) for i in z:print' '.join(`sum(s*t for s,t in zip(i,j))`for j in list(zip(*y))) print

Note that non-ascii characters in the above source code will be escaped (such as \x9f).