(loop for line = (read-line *standard-input* nil nil)
while line
do (let ((S (parse-integer (subseq line 0 (position #\Space line)) :junk-allowed t))
(L (parse-integer (subseq line (position #\Space line)) :junk-allowed t)))
(if (and (every #'integerp (list S L))
(<= 1 S 10)
(<= 1 L 100))
(progn
(format t "~%~D ~D~%" S L)
(let ((P #'evenp))
(dotimes (z L)
(dotimes (y (if (= L 1) 1 S))
(dotimes (x L)
(princ (make-string S :initial-element (if (funcall P x) #\o #\x))))
(terpri))
(setq P (if (eq P #'evenp) #'oddp #'evenp)))))
(format *error-output* "~&Invalid input: ~A~%" line))))
KGxvb3AgZm9yIGxpbmUgPSAocmVhZC1saW5lICpzdGFuZGFyZC1pbnB1dCogbmlsIG5pbCkKICAgICAgd2hpbGUgbGluZQogICAgICBkbyAobGV0ICgoUyAocGFyc2UtaW50ZWdlciAoc3Vic2VxIGxpbmUgMCAocG9zaXRpb24gI1xTcGFjZSBsaW5lKSkgOmp1bmstYWxsb3dlZCB0KSkKICAgICAgICAgICAgICAgKEwgKHBhcnNlLWludGVnZXIgKHN1YnNlcSBsaW5lIChwb3NpdGlvbiAjXFNwYWNlIGxpbmUpKSA6anVuay1hbGxvd2VkIHQpKSkKICAgICAgICAgICAoaWYgKGFuZCAoZXZlcnkgIydpbnRlZ2VycCAobGlzdCBTIEwpKQogICAgICAgICAgICAgICAgICAgICg8PSAxIFMgMTApCiAgICAgICAgICAgICAgICAgICAgKDw9IDEgTCAxMDApKQogICAgICAgICAgICAgICAocHJvZ24KICAgICAgICAgICAgICAgICAoZm9ybWF0IHQgIn4lfkQgfkR+JSIgUyBMKQogICAgICAgICAgICAgICAgIChsZXQgKChQICMnZXZlbnApKQogICAgICAgICAgICAgICAgICAgKGRvdGltZXMgKHogTCkKICAgICAgICAgICAgICAgICAgICAgKGRvdGltZXMgKHkgKGlmICg9IEwgMSkgMSBTKSkKICAgICAgICAgICAgICAgICAgICAgICAoZG90aW1lcyAoeCBMKQogICAgICAgICAgICAgICAgICAgICAgICAgKHByaW5jIChtYWtlLXN0cmluZyBTIDppbml0aWFsLWVsZW1lbnQgKGlmIChmdW5jYWxsIFAgeCkgI1xvICNceCkpKSkKICAgICAgICAgICAgICAgICAgICAgICAodGVycHJpKSkKICAgICAgICAgICAgICAgICAgICAgKHNldHEgUCAoaWYgKGVxIFAgIydldmVucCkgIydvZGRwICMnZXZlbnApKSkpKQogICAgICAgICAgICAgICAoZm9ybWF0ICplcnJvci1vdXRwdXQqICJ+JkludmFsaWQgaW5wdXQ6IH5BfiUiIGxpbmUpKSkpCg==