3 nested loop example for array comprehension