Monotonic Queue and GrundyNumbers