My solution to Reverse Words