A sorting exercise that a friend proposed