1. g6 and if...
1. ...fxg6 2. h6 gxh6 (any other move allows 3. hxg7 and 4. g8=Q) 3. f6 and the pawn promotes.
1. ...hxg6 2. f6 gxf6 (any other move allows 3. fxg7 and 4. g8=Q) 3. h6 and the pawn promotes.
1. ...f6 2. gxh7 and 3. h8=Q is unavoidable.
1. ...h6 2. gxf7 and 3. f8=Q is unavoidable.
Any other move allows both 2. gxf7 and 2. gxh7.
g6