Section 29. Whoever violates any of the provisions of sections twenty-five A to twenty-five C, inclusive, shall be punished for the first offence by a fine of not less than ten nor more than fifty dollars, and for each subsequent offence shall be punished by a fine of not less than twenty nor more than one hundred dollars, or by imprisonment in jail for not less than thirty days nor more than three months, or both.