Whoever violates any provisions of this chapter shall be fined, for the first offense, not more than $30, and, for any subsequent or repeated offense, not more than $50, or shall be imprisoned for such subsequent or repeated offense for not more than 30 days.