Section 32. Whoever, for the purpose of competing for a purse or premium offered by an agricultural society, or by a person or association in the commonwealth, knowingly and designedly enters or drives a horse that is painted or disguised, or is a different horse from the one that purports to be entered or driven, or knowingly and designedly, for the purpose of competing for a premium or purse, enters or drives a horse in a class to which it does not belong, shall be punished by a fine of not more than five hundred dollars or by imprisonment for not more than six months.