Classification of ${2s}^{2}{2p}^{n}-{2s}^{2}{2p}^{n-1}4d$ Fe XVIII and Fe XIX lines in laser-produced plasma and solar spectra