Maze's End + Scapeshift

Maze's End

Maze's End on the battlefield. Scapeshift in hand. 5gg available. You control at least 9 other lands. At least 10 total Gates with different names in your library and/or on the battlefield.
  1. Cast Scapeshift, sacrificing 9 lands and searching your library for nine gates minus the number of gates already on the battlefield under your control and putting them onto the battlefield
  2. Activate Maze's End, searching your library for a tenth gate and putting it onto the battlefield, winning you the game
Win the game.