In 1954 M. Heins proved that for any analytic set A, containing the infinity, there exists an entire function with asymptotic set A. In the article we prove the following analog of Heins's theorem: for a multi-connected planar domain D with an isolated boundary fragment, an analytic set A, ∞∈A, and a prime end of D with impression p there exists an analytic in D function f such that A is the set of asymptotic values of f connected with p.