while(0<1)println(readLine split" "reduce((a,b)=>(for(x<-a;y<-b)yield""+x+y)mkString" "))