/* 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 { { ); iterate(lists); } } static void iterate(List<List<String>> lists) { int[] size = new int[lists.size()+1]; size[lists.size()] = 1; for (int i = lists.size()-1 ; i >= 0 ; i--) { size[i] = size[i+1]*lists.get(i).size(); } for (int i = 0 ; i != size[0] ; i++) { print( lists.get(0).get((i/size[1]) % lists.get(0).size()) , lists.get(1).get((i/size[2]) % lists.get(1).size()) , lists.get(2).get((i/size[3]) % lists.get(2).size()) , lists.get(3).get((i/size[4]) % lists.get(3).size()) , lists.get(4).get((i/size[5]) % lists.get(4).size()) , lists.get(5).get((i/size[6]) % lists.get(5).size()) ); } } }
Standard input is empty
Quick Fox Jumps Like a Fat Rat Quick Fox Jumps Like a Fat Walrus Quick Fox Jumps Like a Fat Wombat Quick Fox Jumps Like a Crazy Rat Quick Fox Jumps Like a Crazy Walrus Quick Fox Jumps Like a Crazy Wombat Quick Fox Jumps Like a Large Rat Quick Fox Jumps Like a Large Walrus Quick Fox Jumps Like a Large Wombat Quick Fox Jumps Unlike a Fat Rat Quick Fox Jumps Unlike a Fat Walrus Quick Fox Jumps Unlike a Fat Wombat Quick Fox Jumps Unlike a Crazy Rat Quick Fox Jumps Unlike a Crazy Walrus Quick Fox Jumps Unlike a Crazy Wombat Quick Fox Jumps Unlike a Large Rat Quick Fox Jumps Unlike a Large Walrus Quick Fox Jumps Unlike a Large Wombat Quick Fox Eats Like a Fat Rat Quick Fox Eats Like a Fat Walrus Quick Fox Eats Like a Fat Wombat Quick Fox Eats Like a Crazy Rat Quick Fox Eats Like a Crazy Walrus Quick Fox Eats Like a Crazy Wombat Quick Fox Eats Like a Large Rat Quick Fox Eats Like a Large Walrus Quick Fox Eats Like a Large Wombat Quick Fox Eats Unlike a Fat Rat Quick Fox Eats Unlike a Fat Walrus Quick Fox Eats Unlike a Fat Wombat Quick Fox Eats Unlike a Crazy Rat Quick Fox Eats Unlike a Crazy Walrus Quick Fox Eats Unlike a Crazy Wombat Quick Fox Eats Unlike a Large Rat Quick Fox Eats Unlike a Large Walrus Quick Fox Eats Unlike a Large Wombat Quick Fox Sleeps Like a Fat Rat Quick Fox Sleeps Like a Fat Walrus Quick Fox Sleeps Like a Fat Wombat Quick Fox Sleeps Like a Crazy Rat Quick Fox Sleeps Like a Crazy Walrus Quick Fox Sleeps Like a Crazy Wombat Quick Fox Sleeps Like a Large Rat Quick Fox Sleeps Like a Large Walrus Quick Fox Sleeps Like a Large Wombat Quick Fox Sleeps Unlike a Fat Rat Quick Fox Sleeps Unlike a Fat Walrus Quick Fox Sleeps Unlike a Fat Wombat Quick Fox Sleeps Unlike a Crazy Rat Quick Fox Sleeps Unlike a Crazy Walrus Quick Fox Sleeps Unlike a Crazy Wombat Quick Fox Sleeps Unlike a Large Rat Quick Fox Sleeps Unlike a Large Walrus Quick Fox Sleeps Unlike a Large Wombat Quick Cat Jumps Like a Fat Rat Quick Cat Jumps Like a Fat Walrus Quick Cat Jumps Like a Fat Wombat Quick Cat Jumps Like a Crazy Rat Quick Cat Jumps Like a Crazy Walrus Quick Cat Jumps Like a Crazy Wombat Quick Cat Jumps Like a Large Rat Quick Cat Jumps Like a Large Walrus Quick Cat Jumps Like a Large Wombat Quick Cat Jumps Unlike a Fat Rat Quick Cat Jumps Unlike a Fat Walrus Quick Cat Jumps Unlike a Fat Wombat Quick Cat Jumps Unlike a Crazy Rat Quick Cat Jumps Unlike a Crazy Walrus Quick Cat Jumps Unlike a Crazy Wombat Quick Cat Jumps Unlike a Large Rat Quick Cat Jumps Unlike a Large Walrus Quick Cat Jumps Unlike a Large Wombat Quick Cat Eats Like a Fat Rat Quick Cat Eats Like a Fat Walrus Quick Cat Eats Like a Fat Wombat Quick Cat Eats Like a Crazy Rat Quick Cat Eats Like a Crazy Walrus Quick Cat Eats Like a Crazy Wombat Quick Cat Eats Like a Large Rat Quick Cat Eats Like a Large Walrus Quick Cat Eats Like a Large Wombat Quick Cat Eats Unlike a Fat Rat Quick Cat Eats Unlike a Fat Walrus Quick Cat Eats Unlike a Fat Wombat Quick Cat Eats Unlike a Crazy Rat Quick Cat Eats Unlike a Crazy Walrus Quick Cat Eats Unlike a Crazy Wombat Quick Cat Eats Unlike a Large Rat Quick Cat Eats Unlike a Large Walrus Quick Cat Eats Unlike a Large Wombat Quick Cat Sleeps Like a Fat Rat Quick Cat Sleeps Like a Fat Walrus Quick Cat Sleeps Like a Fat Wombat Quick Cat Sleeps Like a Crazy Rat Quick Cat Sleeps Like a Crazy Walrus Quick Cat Sleeps Like a Crazy Wombat Quick Cat Sleeps Like a Large Rat Quick Cat Sleeps Like a Large Walrus Quick Cat Sleeps Like a Large Wombat Quick Cat Sleeps Unlike a Fat Rat Quick Cat Sleeps Unlike a Fat Walrus Quick Cat Sleeps Unlike a Fat Wombat Quick Cat Sleeps Unlike a Crazy Rat Quick Cat Sleeps Unlike a Crazy Walrus Quick Cat Sleeps Unlike a Crazy Wombat Quick Cat Sleeps Unlike a Large Rat Quick Cat Sleeps Unlike a Large Walrus Quick Cat Sleeps Unlike a Large Wombat Quick Dog Jumps Like a Fat Rat Quick Dog Jumps Like a Fat Walrus Quick Dog Jumps Like a Fat Wombat Quick Dog Jumps Like a Crazy Rat Quick Dog Jumps Like a Crazy Walrus Quick Dog Jumps Like a Crazy Wombat Quick Dog Jumps Like a Large Rat Quick Dog Jumps Like a Large Walrus Quick Dog Jumps Like a Large Wombat Quick Dog Jumps Unlike a Fat Rat Quick Dog Jumps Unlike a Fat Walrus Quick Dog Jumps Unlike a Fat Wombat Quick Dog Jumps Unlike a Crazy Rat Quick Dog Jumps Unlike a Crazy Walrus Quick Dog Jumps Unlike a Crazy Wombat Quick Dog Jumps Unlike a Large Rat Quick Dog Jumps Unlike a Large Walrus Quick Dog Jumps Unlike a Large Wombat Quick Dog Eats Like a Fat Rat Quick Dog Eats Like a Fat Walrus Quick Dog Eats Like a Fat Wombat Quick Dog Eats Like a Crazy Rat Quick Dog Eats Like a Crazy Walrus Quick Dog Eats Like a Crazy Wombat Quick Dog Eats Like a Large Rat Quick Dog Eats Like a Large Walrus Quick Dog Eats Like a Large Wombat Quick Dog Eats Unlike a Fat Rat Quick Dog Eats Unlike a Fat Walrus Quick Dog Eats Unlike a Fat Wombat Quick Dog Eats Unlike a Crazy Rat Quick Dog Eats Unlike a Crazy Walrus Quick Dog Eats Unlike a Crazy Wombat Quick Dog Eats Unlike a Large Rat Quick Dog Eats Unlike a Large Walrus Quick Dog Eats Unlike a Large Wombat Quick Dog Sleeps Like a Fat Rat Quick Dog Sleeps Like a Fat Walrus Quick Dog Sleeps Like a Fat Wombat Quick Dog Sleeps Like a Crazy Rat Quick Dog Sleeps Like a Crazy Walrus Quick Dog Sleeps Like a Crazy Wombat Quick Dog Sleeps Like a Large Rat Quick Dog Sleeps Like a Large Walrus Quick Dog Sleeps Like a Large Wombat Quick Dog Sleeps Unlike a Fat Rat Quick Dog Sleeps Unlike a Fat Walrus Quick Dog Sleeps Unlike a Fat Wombat Quick Dog Sleeps Unlike a Crazy Rat Quick Dog Sleeps Unlike a Crazy Walrus Quick Dog Sleeps Unlike a Crazy Wombat Quick Dog Sleeps Unlike a Large Rat Quick Dog Sleeps Unlike a Large Walrus Quick Dog Sleeps Unlike a Large Wombat Brown Fox Jumps Like a Fat Rat Brown Fox Jumps Like a Fat Walrus Brown Fox Jumps Like a Fat Wombat Brown Fox Jumps Like a Crazy Rat Brown Fox Jumps Like a Crazy Walrus Brown Fox Jumps Like a Crazy Wombat Brown Fox Jumps Like a Large Rat Brown Fox Jumps Like a Large Walrus Brown Fox Jumps Like a Large Wombat Brown Fox Jumps Unlike a Fat Rat Brown Fox Jumps Unlike a Fat Walrus Brown Fox Jumps Unlike a Fat Wombat Brown Fox Jumps Unlike a Crazy Rat Brown Fox Jumps Unlike a Crazy Walrus Brown Fox Jumps Unlike a Crazy Wombat Brown Fox Jumps Unlike a Large Rat Brown Fox Jumps Unlike a Large Walrus Brown Fox Jumps Unlike a Large Wombat Brown Fox Eats Like a Fat Rat Brown Fox Eats Like a Fat Walrus Brown Fox Eats Like a Fat Wombat Brown Fox Eats Like a Crazy Rat Brown Fox Eats Like a Crazy Walrus Brown Fox Eats Like a Crazy Wombat Brown Fox Eats Like a Large Rat Brown Fox Eats Like a Large Walrus Brown Fox Eats Like a Large Wombat Brown Fox Eats Unlike a Fat Rat Brown Fox Eats Unlike a Fat Walrus Brown Fox Eats Unlike a Fat Wombat Brown Fox Eats Unlike a Crazy Rat Brown Fox Eats Unlike a Crazy Walrus Brown Fox Eats Unlike a Crazy Wombat Brown Fox Eats Unlike a Large Rat Brown Fox Eats Unlike a Large Walrus Brown Fox Eats Unlike a Large Wombat Brown Fox Sleeps Like a Fat Rat Brown Fox Sleeps Like a Fat Walrus Brown Fox Sleeps Like a Fat Wombat Brown Fox Sleeps Like a Crazy Rat Brown Fox Sleeps Like a Crazy Walrus Brown Fox Sleeps Like a Crazy Wombat Brown Fox Sleeps Like a Large Rat Brown Fox Sleeps Like a Large Walrus Brown Fox Sleeps Like a Large Wombat Brown Fox Sleeps Unlike a Fat Rat Brown Fox Sleeps Unlike a Fat Walrus Brown Fox Sleeps Unlike a Fat Wombat Brown Fox Sleeps Unlike a Crazy Rat Brown Fox Sleeps Unlike a Crazy Walrus Brown Fox Sleeps Unlike a Crazy Wombat Brown Fox Sleeps Unlike a Large Rat Brown Fox Sleeps Unlike a Large Walrus Brown Fox Sleeps Unlike a Large Wombat Brown Cat Jumps Like a Fat Rat Brown Cat Jumps Like a Fat Walrus Brown Cat Jumps Like a Fat Wombat Brown Cat Jumps Like a Crazy Rat Brown Cat Jumps Like a Crazy Walrus Brown Cat Jumps Like a Crazy Wombat Brown Cat Jumps Like a Large Rat Brown Cat Jumps Like a Large Walrus Brown Cat Jumps Like a Large Wombat Brown Cat Jumps Unlike a Fat Rat Brown Cat Jumps Unlike a Fat Walrus Brown Cat Jumps Unlike a Fat Wombat Brown Cat Jumps Unlike a Crazy Rat Brown Cat Jumps Unlike a Crazy Walrus Brown Cat Jumps Unlike a Crazy Wombat Brown Cat Jumps Unlike a Large Rat Brown Cat Jumps Unlike a Large Walrus Brown Cat Jumps Unlike a Large Wombat Brown Cat Eats Like a Fat Rat Brown Cat Eats Like a Fat Walrus Brown Cat Eats Like a Fat Wombat Brown Cat Eats Like a Crazy Rat Brown Cat Eats Like a Crazy Walrus Brown Cat Eats Like a Crazy Wombat Brown Cat Eats Like a Large Rat Brown Cat Eats Like a Large Walrus Brown Cat Eats Like a Large Wombat Brown Cat Eats Unlike a Fat Rat Brown Cat Eats Unlike a Fat Walrus Brown Cat Eats Unlike a Fat Wombat Brown Cat Eats Unlike a Crazy Rat Brown Cat Eats Unlike a Crazy Walrus Brown Cat Eats Unlike a Crazy Wombat Brown Cat Eats Unlike a Large Rat Brown Cat Eats Unlike a Large Walrus Brown Cat Eats Unlike a Large Wombat Brown Cat Sleeps Like a Fat Rat Brown Cat Sleeps Like a Fat Walrus Brown Cat Sleeps Like a Fat Wombat Brown Cat Sleeps Like a Crazy Rat Brown Cat Sleeps Like a Crazy Walrus Brown Cat Sleeps Like a Crazy Wombat Brown Cat Sleeps Like a Large Rat Brown Cat Sleeps Like a Large Walrus Brown Cat Sleeps Like a Large Wombat Brown Cat Sleeps Unlike a Fat Rat Brown Cat Sleeps Unlike a Fat Walrus Brown Cat Sleeps Unlike a Fat Wombat Brown Cat Sleeps Unlike a Crazy Rat Brown Cat Sleeps Unlike a Crazy Walrus Brown Cat Sleeps Unlike a Crazy Wombat Brown Cat Sleeps Unlike a Large Rat Brown Cat Sleeps Unlike a Large Walrus Brown Cat Sleeps Unlike a Large Wombat Brown Dog Jumps Like a Fat Rat Brown Dog Jumps Like a Fat Walrus Brown Dog Jumps Like a Fat Wombat Brown Dog Jumps Like a Crazy Rat Brown Dog Jumps Like a Crazy Walrus Brown Dog Jumps Like a Crazy Wombat Brown Dog Jumps Like a Large Rat Brown Dog Jumps Like a Large Walrus Brown Dog Jumps Like a Large Wombat Brown Dog Jumps Unlike a Fat Rat Brown Dog Jumps Unlike a Fat Walrus Brown Dog Jumps Unlike a Fat Wombat Brown Dog Jumps Unlike a Crazy Rat Brown Dog Jumps Unlike a Crazy Walrus Brown Dog Jumps Unlike a Crazy Wombat Brown Dog Jumps Unlike a Large Rat Brown Dog Jumps Unlike a Large Walrus Brown Dog Jumps Unlike a Large Wombat Brown Dog Eats Like a Fat Rat Brown Dog Eats Like a Fat Walrus Brown Dog Eats Like a Fat Wombat Brown Dog Eats Like a Crazy Rat Brown Dog Eats Like a Crazy Walrus Brown Dog Eats Like a Crazy Wombat Brown Dog Eats Like a Large Rat Brown Dog Eats Like a Large Walrus Brown Dog Eats Like a Large Wombat Brown Dog Eats Unlike a Fat Rat Brown Dog Eats Unlike a Fat Walrus Brown Dog Eats Unlike a Fat Wombat Brown Dog Eats Unlike a Crazy Rat Brown Dog Eats Unlike a Crazy Walrus Brown Dog Eats Unlike a Crazy Wombat Brown Dog Eats Unlike a Large Rat Brown Dog Eats Unlike a Large Walrus Brown Dog Eats Unlike a Large Wombat Brown Dog Sleeps Like a Fat Rat Brown Dog Sleeps Like a Fat Walrus Brown Dog Sleeps Like a Fat Wombat Brown Dog Sleeps Like a Crazy Rat Brown Dog Sleeps Like a Crazy Walrus Brown Dog Sleeps Like a Crazy Wombat Brown Dog Sleeps Like a Large Rat Brown Dog Sleeps Like a Large Walrus Brown Dog Sleeps Like a Large Wombat Brown Dog Sleeps Unlike a Fat Rat Brown Dog Sleeps Unlike a Fat Walrus Brown Dog Sleeps Unlike a Fat Wombat Brown Dog Sleeps Unlike a Crazy Rat Brown Dog Sleeps Unlike a Crazy Walrus Brown Dog Sleeps Unlike a Crazy Wombat Brown Dog Sleeps Unlike a Large Rat Brown Dog Sleeps Unlike a Large Walrus Brown Dog Sleeps Unlike a Large Wombat