Reconstruction of nonmonotonic electron density profiles of the Martian topside ionosphere