Six barrels, each containing either oil, vinegar, or water, fell off a ship during a terrible storm. The barrels weighed 16 kg, 21 kg, 23 kg, 25 kg, 27 kg, and 39 kg. There was twice as much mass of oil as there was of vinegar, and only one of the barrels contained water. Which barrels contained which liquid? Find all possible solutions.