There is nothing wrong with the above code by itself. You can easily nest for each loops within each other.
If you were to provide some more details as to what you are hoping to achieve with this then I could be a little more helpful.
If you were to provide some more details as to what you are hoping to achieve with this then I could be a little more helpful.