Updated WordSplit:  added utility function to print result from given string.