Sa'id bin al-Musayyib (may Allah have mercy on him) said that two men shared (intercourse with) a woman in the same period of purity, and she gave birth to a child. They brought the dispute to Sayyiduna Umar (may Allah be pleased with him). He sent for three physiognomists and called for some soil, on which the two men and the boy trod. Then he said to one of them: Look. The physiognomist looked at (the prints) from the front, from the side and from behind, then said: Shall I say it quietly or openly? He said: Say it quietly. He said: The resemblance is with both of them; I do not know whose he is. Then the second looked, and he too said: Shall I say it openly or keep it quiet? He was told: Keep it quiet. (He said:) The resemblance is with both of them, but it cannot be known whose he is. Then the third was told: Look. He looked and asked: Shall I say it openly or keep it quiet? He said: Say it openly. He said: The resemblance is with both of them, but whose he is cannot be told. Then Sayyiduna Umar (may Allah be pleased with him) said three times: We (too) trace footprints; and Sayyiduna Umar (may Allah be pleased with him) was himself a physiognomist. Sayyiduna Umar (may Allah be pleased with him) made the child heir of both of them, and they would be his heirs. Sa'id (may Allah have mercy on him) said: (Do you know) who his 'asabah (paternal heirs) are? I said: No. He said: Whichever of the two survives.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الدعوى والبينات / 21265