Every railroad company which issues any stock, contract, or writing granting, transferring, or securing to any person any estate, right, title, or interest in or to any such lands, shall within the time required by law report the same to the commissioner of management and budget, and any failure so to report shall operate as a forfeiture of its corporate franchises and privileges, and the attorney general shall thereupon proceed against such company to have its charter and franchises declared forfeited.