The owner or general agent of a building or premises where a violation of any provisions of this chapter has been committed or shall exist, or the lessee or tenants over the entire building or entire premises where such violation has been committed or shall exist, or the owner, general agent, lessee or tenant of any part of the building or premises in which such violation has been committed or shall exist, or the general agent, architect, builder, contractor or any other person who commits, takes part or assist in any such violation or who maintains any building or premises or any part thereof in which any violation shall exist, shall be guilty of a violation punishable by a fine not exceeding $350 for conviction of a first offense; for conviction of a second offense, both of which were committed within the period of five years, punishable by fine not less than $350 nor more than $700; and upon a conviction of a third or subsequent offense, all of which were committed within a period of five years, punishable by a fine not less than $700 nor more than $800.