text;
                    } else {
                        subText = text.slice(-maxLength);
                    }
                    while (subText.length > 0) {
                        // If the subText is in the dictionary or the length of the subText is 1, then add it to the result
                        if (dictionary.includes(subText) || subText.length === 1) {
                            result.push(subText);
                            // Remove the subText from the text
                          