($n,$w,$h)=glob<>;@s=<>=~/o*./sg;0while$h-=print map(vec($s[$_],$h,8)?o:x,0..$w-1),$/