In order to secure and preserve to the United States the full value and benefit of its liens upon all the telegraph lines required to be constructed by and lawfully belonging to railroad and telegraph companies referred to in section 9 of this title, and to have the same possessed, used, and operated in conformity with sections 9 to 15 of this title, it is made the duty of the Attorney General of the United States, by proper proceedings, to prevent any unlawful interference with the rights and equities of the United States under all acts of Congress relating to such railroads and telegraph lines, and to have legally ascertained and finally adjudicated all alleged rights of all persons and corporations whatever claiming in any manner any control or interest of any kind in any telegraph lines or property, or exclusive rights-of-way upon the lands of said railroad companies, or any of them, and to have all contracts and provisions of contracts set aside and annulled which have been unlawfully and beyond their powers entered into by said railroad or telegraph companies, or any of them, with any other person, company, or corporation.