A tank can be filled by one pipe in four hours and by a second pipe in six hours; and when it is full, the tank can be drained by a third pipe in three hours. If the tank is empty and all three pipes are open, in how many hours will the tank be filled?
A. 8 hours
B. 12 hours
C. 24 hours