Linear pyridazine and pyrrole compounds, processes for obtaining them and uses