This is a result of G. V. Belyi from 1979. At the time it was considered surprising, and it spurred Grothendieck to develop his theory of dessins d'enfant, which describes non-singular algebraic curves over the algebraic numbers using combinatorial data.
Quotients of the upper half-plane
It follows that the Riemann surface in question can be taken to be the quotient
Belyi functions and dessins d'enfants – but not Belyi's theorem – date at least to the work of Felix Klein; he used them in his article (Klein 1879) to study an 11-fold cover of the complex projective line with monodromy group PSL(2,11).[1]
Wushi Goldring (2012), "Unifying themes suggested by Belyi's Theorem", in Dorian Goldfeld; Jay Jorgenson; Peter Jones; Dinakar Ramakrishnan; Kenneth A. Ribet; John Tate (eds.), Number Theory, Analysis and Geometry. In Memory of Serge Lang, Springer, pp. 181–214, ISBN978-1-4614-1259-5