Distribution of repetitions of ancestors in genealogical trees