I believe that the point he was trying to make (and what everyone else seems to have assumed) is that i/p: and o/p: are not part of the actual data, but only labels in the forum post's text to refer to the input data and the output data.
When the original post does not specify a platform, it would be thoughtful to avoid using proprietary extensions that provide zero benefit and have a portable counterpart.
Aside from the potentially problematic \n, the explicit capture and backreference aren't needed.
sed 's/.../&\
/g'
Note that both variations of this approach will insert additional blank lines after each line that is a multiple of 3 characters long.
In my opinion, however, anything other than fold is just an academic exercise.