Implement the reverse by words program