Sort:  

This is quite easy to solve once you break the problem down into smaller "puzzles." Why don't you tell us what you've tried and then I can help you to solve this yourself. You don't learn much by just getting the answer.