# [Charcoal](https://github.com/somebody1234/Charcoal), 49 bytes (noncompeting)

    Nα⪫…⟦…O_α…_Oα⟧N¶AKAβA№βOθHW¹⁰⁰⁰θ«A§β§⌕AβO‽θXA№βOθ

## Verbose

	InputNumber(a)
	Print(Join(CycleChop([CycleChop("O_", a),CycleChop("_O", a)],InputNumber()), "\n"))
	Assign(PeekAll(), b)
	Assign(Count(b, "O"), c)
	RefreshWhile (1000, c) {
	    AssignAtIndex(b, AtIndex(FindAll(b, "O"), Random(c)), "X")
	    Assign(Count(b, "O"), c)
	}