val x=readLine for(a<-readLine;b<-x)println(x.flatMap(c=>Seq('(',b,a,c,')')).mkString)