Fair ring codes