Measurement of the forward-backward asymmetry in Z→bb and Z→cc