solution to easy problem rever words