/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		List<List<String>> al = new ArrayList<>();
         al.add(Arrays.asList("oldinventory1", "oldinventory2"));
         al.add(Arrays.asList("oldinventory3", "oldinventory4"));
         String str = "newinventory5, newinventory6,, newinventory6"; // <-- let's assume the user wants to add a 5 and 6
         al.add(Arrays.asList(str.split(",\\s*")));
        System.out.println(al);
	}
}