Question d’entretien chez Amazon

Reorganize a string into a specific pattern based on prompt.