Cognizant Interview Question

What is Oops. Write a Program given string array String[] input ={"eat", "tap", "cat", "tea", "act", "pat", "ate"}; //output = [["eat", "tea", "ate"], ["cat", "act"], ["tap", "pat"]]