Click the flag to input a string. Due to the single-use nature of the algorithm I developed, you will need to refresh the page to input another string and receive the correct output. Despite this, the algorithm should work for all characters, including non-ASCII ones. Thank you to @Java_Programmer for hosting the Codegolf tournament, and a HUGE thank you to @TiberiumFusion for suggesting this challenge!