Reconstruction of cosmological initial conditions from galaxy redshift catalogues