A factory's average cost per unit, C(q), is expressed in dollars. The cost starts at C(0)=50. It falls by 4 per unit for the first 6 units produced, stays constant for the next 4 units, then rises by 3 per unit for the following 10 units. Find C(12).