You are most likely going to want to use nested for loops rather than separate loops.