CrimsonLogic interview question

Take in an input string and output the string in a given format