Code Jam Africa 2010, Qualification Round: Problem B. Reverse Words