Synthesis of heavy and superheavy elements by reactions of massive nuclei