Structure of nuclei far from the stability in relativistic approach