A container contains a mixture of two liquids A and B in the ratio 7: 5. When 9 liters of mixture are drawn off and the container is filled with B, the ratio of A and B becomes 7: 9. How many liters of liquid A was contained in the container initially.