Text this: The generation of longest optimal box repetition-free words