main=interact$k.span(>[]).map(map read.words).lines k(a,_:b)=unlines[do e<-c;f<-d;r$take 5$r$" "++show(e*f)|c<-a,d<-b] r=reverse
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page