The phrase “XOXO” is a not-uncommon way to close a letter, email, text message, or, in the case of TV’s Gossip Girl, an episode. It means “hugs and kisses,” although that’s reversed — the Xs are kisses and the Os hugs. But there’s no obvious link between these two letters and their associated acts. Where do they come from?

The X-as-kiss most likely has origins from the Middle Ages. According to HowStuffWorks, due to low literacy rates at the time, many people were unable to write even their own names. For them, the X became a convention used as a signature. With the X also signifying the St. Andrews’ Cross (and, perhaps, the Greek word for “Christ” as well), it also therefore established the signature as one carrying an oath of significant meaning to the signer. At the time, one further affirmed his vow by kissing the X, signifying a connection with the signature beyond mere words. Over time, the “X” therefore came known as the kiss symbol. (And, most likely, the term “sealed with a kiss” has the same origin.) According to the Online Etymology Dictionary, the first known use of “X” to mean “kiss” dates back to 1765, although the specific source goes unnamed.

While most agree that the above is why “X” means “kiss,” there is no consensus around the origins of O-as-hug. Most agree that the shortcut developed in the United States, most likely around the late 1800s or early 1900s. Some believe that Jewish immigrants to the United States, unwilling to use the cross, adopted the “O” instead, but the evidentiary basis for that is weak. (Given that tic-tac-toe developed at around the same time, perhaps the two are related, but that is entirely speculation.) We don’t know the true origins of the “O” hug, and, most likely, never will.

Bonus fact : If you played tic-tac-toe recently — and you aren’t still a young child — chances are you played to a draw. A basic understanding of tic-tac-toe strategy will almost always guarantee that outcome. (If you need strategy help, click this.) But what if you played randomly? There are 255,168 different possible tic-tac-toe outcomes (if we do not remove games which are repeats due to rotating or reflecting the board), according to Wikipedia. Of those, 131,184 (51.4%) result in a win for X (assuming it goes first), 77,904 (30.5%) result in a win for O, and the remaining 46,080 (18.1%) result in draws.

From the Archives: Hug Me Dot: How to know if you can hug a Mensa member.

Related: Twenty-five dollars of hugs and kisses.