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

import java.util.*;
import java.util.concurrent.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void delay(){
		try{
			Thread.sleep(ThreadLocalRandom.current().nextInt(100,300));
		}catch(Exception ex){}
	}
	
	public static void main (String[] args) throws java.lang.Exception
	{
    	List<String> orders = Arrays.asList("order1", "order2", "order3", "order4");
		List<String> rules = Arrays.asList("rule1", "rule2", "rule3");
		orders.stream().parallel().forEach(order->{
			rules.forEach(rule->{
				delay();
				System.out.println(order+"-"+rule);
			});
		});
	}
}