in reply to joining words
This looks like a Homework question rather than a real world application.
Update: I see that you have once again updated your post without showing the edits. Don't do that.