There was something wrong with the Character_B_or_D function.