  We calculate profiles of spectral lines from an extended outflow from the
compact object (a black hole or a neutron star). We assume that the bulk
velocity of the flow increases during a short phase of acceleration and then
rapidly decreases forming a failed wind. We also study the wind which is only
decelerating. We show that depending on the relative strength of the
gravitational redshifting line profiles from such winds may be of several
types: distorted P-Cygni (emission and blueshifted absorption); W-shaped
(absorption-emission-absorption) and inverted P-Cygni (emission-redshifted
absorption). The latter case is expected from accretion flows where the
velocity is directed inwards; however, we show that inverted P-Cygni profile
can be produced by the failed wind, provided the line is formed within several
tens of Schwarzschild radii from the compact object.
