This is White to play and mate in three (composed by Zdenek Mach in 1899) and there are two ways to find the answer: you can either work it out logically, or just look for the most unlikely move, then work out why it is correct.

Taking the more difficult route, we need to follow two different trains of thought until they collide on the same track. The first comes from looking at the forcing moves in the starting position: 1.Qf6+ Kxg4 2.Qf4 would be mate if Black's king did not have the h3 square to run to; 1.Bf6+ Kf4 2.Qc4 would be mate if Black did not have g3. Those two lines tell us that we do not have to worry about any black piece moving to g3 or h3 - there will be a mate ready for it. We also don't have to worry about 1...Qxg4 when 2.Qf6 is mate.

On the other hand, we cannot rely totally on Black running out of moves. An advance of his a-pawn or c-pawn will hardly affect matters on the K- side. So White does need a move that carries a real threat. With the queen and both bishops so close to the king already, however, it is hard to see a move that improves matters.

The position of black pieces on h4, h5 and h6 encourages the search for a mate on the g-file, so we should soon see the idea of 1.Bf5 (threatening Qxg6 mate) gxf5 2.Qg8 mate. The trouble is that 1.Bf5 is met by 1...Qb4+ and Black escapes.

All of which should suggest the idea of a king move, to remove the possibility of a check from Black's queen. So the solution we are looking for is 1.King somewhere, when 1...Qh3, Qg3, Rh3 or Bg3 have mates already provided for them, while any other move is met by 2.Bf5! But where should the white king move? 1.Kc8 is met by Qxg4; 1.Ka7 e2 threatens 2...c4+; 1.Kc7 Bg3 cuts out 2.Bf6+. the only other king move that hides from a queen check is 1.Ka8!! and that's the answer. Or you could have got there at once by looking for the most unlikely move.