TITLE: A Generalization of the Ahlfors function to have varying degrees?
QUESTION [8 upvotes]: It's a classical result of Ahlfors that, for any sufficiently nice n-connected domain $\Omega \subset \mathbb C$ there is a holomorphic branched covering $f: \Omega \rightarrow \mathbb D$ to the disk $\mathbb D$, which extends continuously to the boundary and maps the boundary curves of $\Omega$ monotonically onto the boundary of the disk.
Now, suppose we have $n$ positive integers, $d_1,...,d_n$, and denote the boundary curves of $\Omega$ by $\gamma_1,...\gamma_n$. Can one find a holomorphic map $f: \Omega \rightarrow \mathbb D$ which extends continuously to the boundary of $\Omega$ and maps each $\gamma_i$ onto $S^1$ with degree $d_i$? 
Even the case of $n=2$ seems difficult--one can readily achieve this with a real analytic function $f$ by a pretty basic interpolation. 
The proof of the Ahlfors result also seems to be less than helpful--it involves finding an extremal for the analytic capacity functional and then analyzing the regularity of the optimal function. See, for example:
Krantz's Geometric function theory: explorations in complex analysis, Theorem 4.5.9.

REPLY [4 votes]: The answer to your question is yes. Indeed, one can replace $\mathbb{D}$ with the right half plane, applying a Mobius transformation. Then the argument is quite simple if you are familiar with the following classical theorem of Bieberbach :
Theorem
Let $\Omega$ be a domain bounded by $n$ non-intersecting Jordan curves $\gamma_1,\dots,\gamma_n$. For $1\leq j \leq n$, fix one point $b_j$ in $\gamma_j$. Then there exists a degree $n$ holomorphic branched covering $F$ from $\Omega$ to the right half plane such that $F$ extends continuously to the boundary and $F(b_j)=\infty$ for each $j$. Moreover, $F$ is unique up to a positive multiplicative and an imaginary additive constant.
Using this, it is easy to prove the following, which implies the result that you want.
Theorem
Let $\Omega$ be a domain bounded by $n$ non-intersecting Jordan curves $\gamma_1,\dots,\gamma_n$. For  $1\leq j \leq n$, let $d_j$ be a positive integer. Then there exists a holomorphic branched covering $F$ from $\Omega$ to the right half plane which extends continuously to the boundary such that each restriction $F|_{\gamma_j}$ has degree $d_j$.
Proof Pick any points $a_1,\dots,a_{n-1}$ in $\gamma_1,\dots,\gamma_{n-1}$ respectively, and choose two distinct points $a_{n,1}$ and $a_{n,2}$ in $\gamma_n$. Let $F_1,F_2$ be branched coverings as in Bieberbach's theorem for the points $a_1,\dots,a_{n-1},a_{n,1}$ and $a_1,\dots,a_{n-1},a_{n,2}$ respectively. Then $F:=F_1+F_2$ is a holomorphic branched covering of $\Omega$ onto the right half-plane whose restriction to $\gamma_n$ has degree two and each other boundary restriction has degree one. We may continue this process and add other boundary points that map to infinity until we get the correct degrees. This completes the proof of the theorem.
All the details can be found in the paper The structure of the semi-group of proper holomorphic mappings of a planar domain to the unit disk by Bell and Kaleem.
See section 5, Proper holomorphic mappings of higher degree.