Capgemini interview question

reverse string but keep words in same pattern