One of the most memorable episodes of The Office was actually inspired by real events that took place in another office, in essence linking one Greg Daniels TV show to another in a very real way.

“Office Olympics,” the third episode of the NBC show’s second season, was written by Mike Schur, who went on to create Parks and Recreation and The Good Place. In it, Jim and Pam stage a set of in-office games to kill some time. It’s an episode that’s undoubtedly been recreated many times in real offices in the years since the episode first aired in 2005, but as it turns out the episode was inspired by something that actually happened in a real office.

According to the Office Ladies podcast, hosted by The Office alums Jenna Fischer and Angela Kinsey, the idea came from Greg Daniels, who worked on the animated show King of the Hill. The writers and his assistant, Tim Croston, apparently staged Office Olympics, which became the basis for the episode:

“Tim was the mastermind, the self-appointed commissioner… the Jim,” Kinsey said, revealing that the King of the Hill staffers had an entire opening ceremony, a torch, and even wore special shirts to easily distinguish the different team members at the event. “They marched through the hallways, they had like a banner that each team carried. They had like a full opening ceremony, and you know the doves that you see at the end for our closing ceremonies? They had that. They had doves that went across,” she told Fischer.

One game in particular that Croston loved was Guess The Elevator, which is exactly what it sounds like: guessing which elevator in a bank would open first. That one was so popular that it made its way into the actual episode. But back to King of the Hill, which had Office Olympics that were admittedly far more interesting. And hilariously star-studded:

“They also had a Twinkie eating contest and Paul Lieberstein (Toby Flenderson) came in second, because Paul was working on King of the Hill at the time as well,” Kinsey said. The King of the Hill crew really got into their Olympic games, and so did Chuck Mangione, a famous musician who played a himself as a recurring character on the show. “[Mangione] flew himself out on his own dime to play at the opening ceremonies — he plays the flugelhorn and the trumpet — because he in fact actually played at the Olympics in Lake Placid,” Kinsey shared.

A quick search on YouTube reveals that the actual King of the Hill version of the Office Olympics are on YouTube in three parts, if you’re curious to see what the originals looked like. Yes, there are custom shirts and Mangione music and everything. If anything, this gives you a bit extra inspiration to make your own workplace olympiad happen. And it’s a great trivia fact linking two great shows together forever.