Investigation of inelastic interactions of 400 GeV protons with emulsion nuclei