Java takes all the combinations from n arrays