import std.string, std.range, std.algorithm, std.conv, std.array; struct D { string msg; D opDispatch(string s)() @property { return typeof(return)( ((a, b)=>a.equal(b))( msg.retro().cycle().take(2), msg.chain(s).retro().take(2).array().retro()) ? ((a, b)=>( a.insertInPlace(msg.countUntil(b)+1, ", "), a.idup) )(msg.dup, msg.retro().take(2).array().retro())~s : text(msg,s)); } string d(T)() @proper