  We conduct three-dimensional hydrodynamical simulations of energy deposition
into the envelope of a red giant star as a result of the merger of two close
main sequence stars or brown dwarfs, and show that the outcome is a highly
non-spherical outflow. Such a violent interaction of a triple stellar system
can explain the formation of `messy', i.e., lacking any kind of symmetry,
planetary nebulae (PNe) and similar nebulae around evolved stars. We do not
simulate the merging process, but simply assume that after the tight binary
system enters the envelope of the giant star the interaction with the envelope
causes the two components, stars or brown dwarfs, to merge and liberate
gravitational energy. We deposit the energy over a time period of about nine
hours, which is about one per cent of the orbital period of the merger product
around the centre of the giant star. The ejection of the fast hot gas and its
collision with previously ejected mass are very likely to lead to a transient
event, i.e., an intermediate luminosity optical transient (ILOT).
