Section 28. Violation of any provision of section twenty-two or twenty-three shall be punished for the first offence by a fine of not more than five dollars or by imprisonment for not more than two months for each can, tub or cabinet in respect to which the violation occurs and for any subsequent offence by a fine of not more than ten dollars or by imprisonment for not more than six months for each such can, tub or cabinet.