In 2009, a 12-year-old girl stumbled onto an incredible genealogical connection: Every American president but Martin Van Buren shares a common ancestor.

BridgeAnne d’Avignon, then a seventh-grader from Salinas, California, began studying ancestral lineage as part of a summer project inspired by her grandfather’s 60-year-long dedication to studying presidential genealogy.

With plenty of help from the 80-year-old man, BridgeAnne learned the process of tracing ancestry on her own line. Once comfortable searching through countless records and certificates, the young girl started looking into the background of several presidents.

Soon, she noticed an odd coincidence: Each president seemed to be related to John “Lackland" Plantagenet, perhaps best known as Robin Hood’s enemy, King John. The prodigious royal even signed the Magna Carta in 1215.

It took an estimated 500,000 documents and many months of arduous work, but BridgeAnne had finally solved a historical mystery.

Although genealogists had previously genetically linked 22 of the presidents, they hadn’t been able to find a common ancestor for the majority of the men.

BridgeAnne published her results in an infographic titled “We Are All Related," which is still for sale five years later. In fact, the chart even made it into the Library of Congress’s exhibit on the Magna Carta earlier this year.

She told Good Times Weekly,

I think it would be nice to pass [the chart] along from generation to generation and keep it alive so they can know about this information and spread this information. It’s important to know about your culture, where you’re from, and where your leaders are from.

Perhaps most important for the budding genealogist, BridgeAnne discovered she’s actually the 18th cousin of President Barack Obama. At the time of discovery, she even wrote him a letter to let him know.