def _buffer_word(word, length, backward):
    """
    Simple helper that adds spaces to the end of the provided word so that it will look uniform.
    :param word: word (as a string) to buffer
    :param length: 1 less than the length to buffer to
    :param backward: Whether the provided string should be made backwards (used by the solver for convenience)
    :return: buffered word
    """
    if backward:
        word = word[::-1]

    while len(word) < length + 1:
        word += " "

    return word