isometric y-sort problem

Please see this to get some hints on how to ask questions in a way that gets the answers you want