What happens when water vapor gives up molecular energy?

it changes from a liquid to a gas

it changes from a gas to a liquid

it changes from a solid to a gas