A good start, but the original specification should be a little refined, as for any chain with an odd length, which is simply not possible! This suggests that if you change the specification to approximately equal length, I would analyze if the half -1 symbol is not alphabetic, if it is cut there, if it identifies the previous and next places in space in alphabetical order and cuts closer to half
source
share