for(R=[],G=16;Q=readline(--G);)for(F in Q)'*'==Q[F]&&R.push([(T=Math.atan2(G,F-=15))+9*(T<0),<>({F}, {G})]);for(F in R.sort())print(R[F][1])