A nucleus \(X\) emits a beta particle to produce a nucleus \(Y\). If their atomic masses are \(M_{x}\) and \(M_{y}\) respectively, the maximum energy of the beta particle emitted is (where \(m_{e}\) is the mass of an electron and \(c\) is the velocity of light)
(A) \(\left(\mathrm{M}_{\mathrm{x}}-\mathrm{M}_{\mathrm{y}}-\mathrm{m}_{\mathrm{e}}\right) \mathrm{c}^{2}\)
(B) \(\left(M_{x}-M_{y}+m_{e}\right) c^{2}\)
(C) \(\left(\mathrm{M}_{\mathrm{x}}-\mathrm{M}_{\mathrm{y}}\right) \mathrm{c}^{2}\)
(D) \(\left(M_{x}-M_{y}-2 m_{e}\right) c^{2}\)