The sexual contact was captured on the prison's surveillance system.