A Chinese court sentenced three men to death on Monday for their roles in carrying out an attack near the entrance to Beijing’s Forbidden City in October that left five people dead and 40 injured.