Given a list of strings such as arr = ["abc", "de", "fgh"], cycle through/print all the combinations starting from the first word to the last.