#!/usr/bin/perl
use 5.016;
use warnings;
sub repeat {
my ($n, $f) = @_;
return sub{ ($f->($_[0])) x
$n }; }
sub repeat_alt {
my ($s, $n, $f) = @_;
}
sub f {
my ($m, $n) = @_;
my $marker = sub{ $_[0] % 2 ? 'x' : 'o' };
my $f = repeat_alt("", $n, repeat($m, $marker));
my $g = repeat_alt("\n", $n, repeat($m, $f));
return ($n == 1 ? $f : $g)->(0); }
while(<STDIN>){
print "$m $n\n", f
($m, $n), "\n\n"; }
IyEvdXNyL2Jpbi9wZXJsCnVzZSA1LjAxNjsKdXNlIHdhcm5pbmdzOwoKc3ViIHJlcGVhdCB7CglteSAoJG4sICRmKSA9IEBfOwoKCXJldHVybiBzdWJ7ICgkZi0+KCRfWzBdKSkgeCAkbiB9Owp9CgpzdWIgcmVwZWF0X2FsdCB7CglteSAoJHMsICRuLCAkZikgPSBAXzsKCglyZXR1cm4gc3VieyBqb2luKCRzLCBtYXB7ICRmLT4oJF9bMF0gKyAkXykgfSAoMCAuLiAkbiAtIDEpKSB9Owp9CgpzdWIgZiB7CglteSAoJG0sICRuKSA9IEBfOwoKCW15ICRtYXJrZXIgPSBzdWJ7ICRfWzBdICUgMiA/ICd4JyA6ICdvJyB9OwoJbXkgJGYgPSByZXBlYXRfYWx0KCIiLCAkbiwgcmVwZWF0KCRtLCAkbWFya2VyKSk7CglteSAkZyA9IHJlcGVhdF9hbHQoIlxuIiwgJG4sIHJlcGVhdCgkbSwgJGYpKTsKCglyZXR1cm4gKCRuID09IDEgPyAkZiA6ICRnKS0+KDApOwp9Cgp3aGlsZSg8U1RESU4+KXsKCW15ICgkbSwgJG4pID0gc3BsaXQ7CgoJcHJpbnQgIiRtICRuXG4iLCBmKCRtLCAkbiksICJcblxuIjsKfQo=