# [Jelly], <s>25</s> 22 [bytes]

    ŒgL⁼¥Ðf
    ,UŒD€;Z,$瀀4FṀ

Takes a list of strings (or list of list of characters) formed of `X`, `Y`, and `O` (would also work with replacements such that the space has a lower ordinal than both counters).

**[Try it online!]** or run an [augmented version] that takes a multiline string.


[Jelly]: https://github.com/DennisMitchell/jelly
[bytes]: https://github.com/DennisMitchell/jelly/wiki/Code-page
[Try it online!]: https://tio.run/nexus/jelly#@390UrrPo8Y9h5YenpDGZR16dJLLo6Y11lHWKoeXAxkmbg93Nvz//z9a3R8C1HUIsiIjIyGsyAgg8FePBQA
[augmented version]: https://tio.run/nexus/jelly#@390UrrPo8Y9h5YenpDGZR16dJLLo6Y11lHWKoeXAxkmbg93Nvx/uHvL4fb//yMjIiMj/P25IiIjIiJBNJAC0ZFAYbA4kAsUANNAAQA