for(c<-" "*25;s=readLine)println(1 to 10 filter(i=>s(i-1)/c==2)mkString" ")