Keep your time-complexity graph aside for a moment. Even though System.out.println() prints what you want, where's the fun in that? To print the string you want in an unique and fun way, I made this program to solve a problem which was never there in the first place.
In order to print what you want, you enter the string via input. The program then starts generating random letters from a to z and a spacebar to print sentences as well. Comparing the letters one by one with your inputted string, the program generates the desired string. Seeing the letters generate using RNG and getting them matched with the required letter is a fun process in its own way. You can change the time delay loops in the program to fasten or delay the process as long as you want.