The presence of young massive stars orbiting on eccentric rings within a few tenths of a parsec of the supermassive black hole in the galactic center is challenging for theories of star formation. The high tidal shear from the black hole should tear apart the molecular clouds that form stars elsewhere in the Galaxy, and transport of stars to the galactic center also appears unlikely during their lifetimes. We conducted numerical simulations of the infall of a giant molecular cloud that interacts with the black hole. The transfer of energy during closest approach allows part of the cloud to become bound to the black hole, forming an eccentric disk that quickly fragments to form stars.Compressional heating due to the black hole raises the temperature of the gas up to several hundred to several thousand kelvin, ensuring that the fragmentation produces relatively high stellar masses. These stars retain the eccentricity of the disk and, for a sufficiently massive initial cloud, produce an extremely top-heavy distribution of stellar masses. This potentially repetitive process may explain the presence of multiple eccentric rings of young stars in the presence of a supermassive black hole.