Clara has to fill water from wells into tanks of the same size. The first well has 12 gallons of water, while the second has 54 gallons. What is the largest size clara can choose for all the tanks such that they can completely contain water from either well without any leftover water or partially filled tanks?
A. 3 gallons
B. 4 gallons
C. 6 gallons
D. 12 gallons