If a bag contains 12 quarters, 6 dimes, and 18 nickles, what is the part-to-whole ratio of quarters to all coins?
A. 1:2
B.1:3
C.1:4
D.1:6