Effects of light and heavy Majorana neutrinos in neutrinoless double beta decay