Whether you end a letter or e-mail with it—or you recognize it from the end of each Gossip Girl episode—“Xoxo” is commonly known to refer to the phrase “Kisses and hugs.” But how did these two inconspicuous letters come to represent that well-known phrase?

One possible explanation is that an “X” is a stylized representation of two mouths kissing, while the “O” represents two pairs of arms coming together to complete a hug. This emoticon-inspired account makes sense, but the true explanations are more likely rooted in religious history.

Because many people in the Middle Ages could not read or write, they would sign important documents with an “X," which was both a simple mark to make and a reference to the Christian cross. The signee would then kiss the "X" to demonstrate his sincerity and that what was written in the document was true—in much the same way that Christians kissed the Bible to display their belief in Christ. Besides referencing the actual cross itself, the “X” alluded to the early Christian symbol called the Chi-rho—named after combining the first two letters of the Greek word for Christ, ???????.

Tracing the origin of how the “O” came to represent a hug is more difficult. One possible explanation is that Jewish immigrants, upon arriving in the U.S., used the symbol in place of a signature, similar to the way the "X" was used by Christians. Instead of using an "X," which invoked Christ—a figure that did not align with Jewish beliefs—illiterate Jewish people arriving in the U.S. would sign documents with an “O.”

Combined with the familiar Christian use of an “X” signifying the oath sealed with a kiss, the “O” was likely then adapted to mean hugs as an equal representation in the sincerity of the sentiment on notes, letters, or even e-mails.