Once upon a time there was a village with, 40, married coupled. Let's call t\ hem Mr. i and Mrs. i, where Mr. i and Mrs. i are married to each other, \ where i goes from 1 to, 40 It so happened that Mr. i for i=1 to i=, 30, are cheaters and they each have one mistress (that may be their own wife) The Mistress of Mr., 1, is Mrs., 7 and hence the Lover of Mrs., 7, is Mr. , 1 The Mistress of Mr., 2, is Mrs., 37 and hence the Lover of Mrs., 37, is Mr. , 2 The Mistress of Mr., 3, is Mrs., 2 and hence the Lover of Mrs., 2, is Mr. , 3 The Mistress of Mr., 4, is Mrs., 14 and hence the Lover of Mrs., 14, is Mr. , 4 The Mistress of Mr., 5, is Mrs., 16 and hence the Lover of Mrs., 16, is Mr. , 5 The Mistress of Mr., 6, is Mrs., 28 and hence the Lover of Mrs., 28, is Mr. , 6 The Mistress of Mr., 7, is Mrs., 1 and hence the Lover of Mrs., 1, is Mr. , 7 The Mistress of Mr., 8, is Mrs., 35 and hence the Lover of Mrs., 35, is Mr. , 8 The Mistress of Mr., 9, is Mrs., 26 and hence the Lover of Mrs., 26, is Mr. , 9 The Mistress of Mr., 10, is Mrs., 31 and hence the Lover of Mrs., 31, is Mr. , 10 The Mistress of Mr., 11, is Mrs., 8 and hence the Lover of Mrs., 8, is Mr. , 11 The Mistress of Mr., 12, is Mrs., 24 and hence the Lover of Mrs., 24, is Mr. , 12 The Mistress of Mr., 13, is Mrs., 21 and hence the Lover of Mrs., 21, is Mr. , 13 The Mistress of Mr., 14, is Mrs., 10 and hence the Lover of Mrs., 10, is Mr. , 14 The Mistress of Mr., 15, is Mrs., 9 and hence the Lover of Mrs., 9, is Mr. , 15 The Mistress of Mr., 16, is Mrs., 23 and hence the Lover of Mrs., 23, is Mr. , 16 The Mistress of Mr., 17, is Mrs., 22 and hence the Lover of Mrs., 22, is Mr. , 17 The Mistress of Mr., 18, is Mrs., 20 and hence the Lover of Mrs., 20, is Mr. , 18 The Mistress of Mr., 19, is Mrs., 12 and hence the Lover of Mrs., 12, is Mr. , 19 The Mistress of Mr., 20, is Mrs., 18 and hence the Lover of Mrs., 18, is Mr. , 20 The Mistress of Mr., 21, is Mrs., 13 and hence the Lover of Mrs., 13, is Mr. , 21 The Mistress of Mr., 22, is Mrs., 3 and hence the Lover of Mrs., 3, is Mr. , 22 The Mistress of Mr., 23, is Mrs., 11 and hence the Lover of Mrs., 11, is Mr. , 23 The Mistress of Mr., 24, is Mrs., 4 and hence the Lover of Mrs., 4, is Mr. , 24 The Mistress of Mr., 25, is Mrs., 30 and hence the Lover of Mrs., 30, is Mr. , 25 The Mistress of Mr., 26, is Mrs., 15 and hence the Lover of Mrs., 15, is Mr. , 26 The Mistress of Mr., 27, is Mrs., 33 and hence the Lover of Mrs., 33, is Mr. , 27 The Mistress of Mr., 28, is Mrs., 39 and hence the Lover of Mrs., 39, is Mr. , 28 The Mistress of Mr., 29, is Mrs., 25 and hence the Lover of Mrs., 25, is Mr. , 29 The Mistress of Mr., 30, is Mrs., 19 and hence the Lover of Mrs., 19, is Mr. , 30 The , 30, cheating men and their mistresses refuse to go to Church on Sunday,\ they rather go to the pub There must be a way to match the, 10, faitfhul men, Mr., {31, 32, 33, 34, 35, 36, 37, 38, 39, 40}, with the, 10, faitfhul women Mrs. [5, 6, 17, 27, 29, 32, 34, 36, 38, 40] ---------------------------------- Mr. , 31, first asks his wife My dear wife, will you go with me to Church? Sorry, hubby, but I am going to the pub with my lover, Mr., 10, perhaps his wife Mrs., 10, is willling? So Mr. , 31, asks Mrs., 10, and she replies Sorry Mr., 31, I can't make it, I am going to the pub with my lover Mr. , 14, why won't you ask his wife, Mrs., 14 So Mr. , 31, asks Mrs., 14, and she replies Sorry Mr., 31, I can't make it, I am going to the pub with my lover Mr. , 4, why won't you ask his wife, Mrs., 4 So Mr. , 31, asks Mrs., 4, and she replies Sorry Mr., 31, I can't make it, I am going to the pub with my lover Mr. , 24, why won't you ask his wife, Mrs., 24 So Mr. , 31, asks Mrs., 24, and she replies Sorry Mr., 31, I can't make it, I am going to the pub with my lover Mr. , 12, why won't you ask his wife, Mrs., 12 So Mr. , 31, asks Mrs., 12, and she replies Sorry Mr., 31, I can't make it, I am going to the pub with my lover Mr. , 19, why won't you ask his wife, Mrs., 19 So Mr. , 31, asks Mrs., 19, and she replies Sorry Mr., 31, I can't make it, I am going to the pub with my lover Mr. , 30, why won't you ask his wife, Mrs., 30 So Mr. , 31, asks Mrs., 30, and she replies Sorry Mr., 31, I can't make it, I am going to the pub with my lover Mr. , 25, why won't you ask his wife, Mrs., 25 So Mr. , 31, asks Mrs., 25, and she replies Sorry Mr., 31, I can't make it, I am going to the pub with my lover Mr. , 29, why won't you ask his wife, Mrs., 29 So he asks Mrs., 29, and she happily accepts, since she has no lover and rather go to Church So Mr,, 31, goes to Church with Mrs., 29 ---------------------------------- Mr. , 32, first asks his wife My dear wife, will you go with me to Church? She answers, of course dear! I am a faitfhul woman hence Mr., 32, and his wife Mrs. , 32, happily go to Churce together. ---------------------------------- Mr. , 33, first asks his wife My dear wife, will you go with me to Church? Sorry, hubby, but I am going to the pub with my lover, Mr., 27, perhaps his wife Mrs., 27, is willling? So he asks Mrs., 27, and she happily accepts, since she has no lover and rather go to Church So Mr,, 33, goes to Church with Mrs., 27 ---------------------------------- Mr. , 34, first asks his wife My dear wife, will you go with me to Church? She answers, of course dear! I am a faitfhul woman hence Mr., 34, and his wife Mrs. , 34, happily go to Churce together. ---------------------------------- Mr. , 35, first asks his wife My dear wife, will you go with me to Church? Sorry, hubby, but I am going to the pub with my lover, Mr., 8, perhaps his wife Mrs., 8, is willling? So Mr. , 35, asks Mrs., 8, and she replies Sorry Mr., 35, I can't make it, I am going to the pub with my lover Mr. , 11, why won't you ask his wife, Mrs., 11 So Mr. , 35, asks Mrs., 11, and she replies Sorry Mr., 35, I can't make it, I am going to the pub with my lover Mr. , 23, why won't you ask his wife, Mrs., 23 So Mr. , 35, asks Mrs., 23, and she replies Sorry Mr., 35, I can't make it, I am going to the pub with my lover Mr. , 16, why won't you ask his wife, Mrs., 16 So Mr. , 35, asks Mrs., 16, and she replies Sorry Mr., 35, I can't make it, I am going to the pub with my lover Mr. , 5, why won't you ask his wife, Mrs., 5 So he asks Mrs., 5, and she happily accepts, since she has no lover and rather go to Church So Mr,, 35, goes to Church with Mrs., 5 ---------------------------------- Mr. , 36, first asks his wife My dear wife, will you go with me to Church? She answers, of course dear! I am a faitfhul woman hence Mr., 36, and his wife Mrs. , 36, happily go to Churce together. ---------------------------------- Mr. , 37, first asks his wife My dear wife, will you go with me to Church? Sorry, hubby, but I am going to the pub with my lover, Mr., 2, perhaps his wife Mrs., 2, is willling? So Mr. , 37, asks Mrs., 2, and she replies Sorry Mr., 37, I can't make it, I am going to the pub with my lover Mr. , 3, why won't you ask his wife, Mrs., 3 So Mr. , 37, asks Mrs., 3, and she replies Sorry Mr., 37, I can't make it, I am going to the pub with my lover Mr. , 22, why won't you ask his wife, Mrs., 22 So Mr. , 37, asks Mrs., 22, and she replies Sorry Mr., 37, I can't make it, I am going to the pub with my lover Mr. , 17, why won't you ask his wife, Mrs., 17 So he asks Mrs., 17, and she happily accepts, since she has no lover and rather go to Church So Mr,, 37, goes to Church with Mrs., 17 ---------------------------------- Mr. , 38, first asks his wife My dear wife, will you go with me to Church? She answers, of course dear! I am a faitfhul woman hence Mr., 38, and his wife Mrs. , 38, happily go to Churce together. ---------------------------------- Mr. , 39, first asks his wife My dear wife, will you go with me to Church? Sorry, hubby, but I am going to the pub with my lover, Mr., 28, perhaps his wife Mrs., 28, is willling? So Mr. , 39, asks Mrs., 28, and she replies Sorry Mr., 39, I can't make it, I am going to the pub with my lover Mr. , 6, why won't you ask his wife, Mrs., 6 So he asks Mrs., 6, and she happily accepts, since she has no lover and rather go to Church So Mr,, 39, goes to Church with Mrs., 6 ---------------------------------- Mr. , 40, first asks his wife My dear wife, will you go with me to Church? She answers, of course dear! I am a faitfhul woman hence Mr., 40, and his wife Mrs. , 40, happily go to Churce together. To sum up Regarding the sinners Mr., 1, goes to the pub with Mrs., 7 Mr., 2, goes to the pub with Mrs., 37 Mr., 3, goes to the pub with Mrs., 2 Mr., 4, goes to the pub with Mrs., 14 Mr., 5, goes to the pub with Mrs., 16 Mr., 6, goes to the pub with Mrs., 28 Mr., 7, goes to the pub with Mrs., 1 Mr., 8, goes to the pub with Mrs., 35 Mr., 9, goes to the pub with Mrs., 26 Mr., 10, goes to the pub with Mrs., 31 Mr., 11, goes to the pub with Mrs., 8 Mr., 12, goes to the pub with Mrs., 24 Mr., 13, goes to the pub with Mrs., 21 Mr., 14, goes to the pub with Mrs., 10 Mr., 15, goes to the pub with Mrs., 9 Mr., 16, goes to the pub with Mrs., 23 Mr., 17, goes to the pub with Mrs., 22 Mr., 18, goes to the pub with Mrs., 20 Mr., 19, goes to the pub with Mrs., 12 Mr., 20, goes to the pub with Mrs., 18 Mr., 21, goes to the pub with Mrs., 13 Mr., 22, goes to the pub with Mrs., 3 Mr., 23, goes to the pub with Mrs., 11 Mr., 24, goes to the pub with Mrs., 4 Mr., 25, goes to the pub with Mrs., 30 Mr., 26, goes to the pub with Mrs., 15 Mr., 27, goes to the pub with Mrs., 33 Mr., 28, goes to the pub with Mrs., 39 Mr., 29, goes to the pub with Mrs., 25 Mr., 30, goes to the pub with Mrs., 19 Regarding faithful folks: Mr., 31, and Mrs., 29, happily go to Church together Mr., 32, and Mrs., 32, happily go to Church together Mr., 33, and Mrs., 27, happily go to Church together Mr., 34, and Mrs., 34, happily go to Church together Mr., 35, and Mrs., 5, happily go to Church together Mr., 36, and Mrs., 36, happily go to Church together Mr., 37, and Mrs., 17, happily go to Church together Mr., 38, and Mrs., 38, happily go to Church together Mr., 39, and Mrs., 6, happily go to Church together Mr., 40, and Mrs., 40, happily go to Church together