We construct a model based on the electroweak gauge group SU(2)L×SU(2)R×U(1)B-L augmented by an S3 symmetry. We assign nontrivial S3 transformation properties to the quarks, and consequently we need two scalar bidoublets. Despite the extra bidoublet, we have only six Yukawa couplings thanks to the discrete symmetry. Diagonalization of the quark mass matrices shows that at the leading order only the first two generations mix, resulting in a block diagonal CKM matrix, and the first generation quarks are massless. Inclusion of subleading terms produces an acceptable CKM matrix up to corrections of O(λ4). As for the first generation quark masses, we obtain a satisfactory value for mu/md. The masses themselves, though in the same ballpark, turn out to be somewhat smaller than the accepted range. © 2018 authors. Published by the American Physical Society.