($W,$H,$C)=glob<>; print+(($C^v21,$C)x3e3)[$%..$%+++$W],$/for 1..$H