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

import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.regex.*;
/* 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
	{
		String line = "car water apple 04:48 05:18 05:46 06:16 06:46 07:16 07:46\nbridge night 04:57 05:27 05:56 06:26 06:56 07:26 07:56";
		List<String[]> allMatches = new ArrayList<String[]>();
        Matcher m = Pattern.compile("(?m)^(.*?)\\s*((?:\\d+:\\d+\\s*)*)$")
               .matcher(line);
        while (m.find()) {
             allMatches.add(new String[] { m.group(1), m.group(2)});
        }
 
        for(String[] object: allMatches){
          System.out.println(Arrays.toString(object));
        }
	}
}