Astronauts may be exceptionally brave, intelligent, and accomplished, but they're not super-human: They still have to poop and pee when they leave Earth.

However, as NASA started racing to put astronauts the moon in the 1960s — humans first landed on the lunar surface almost exactly 50 years ago, on July 20, 1969 — the agency didn't focus much on how the men would empty their bladders and bowels in space.

In fact, astronaut Alan Shepard — the first American in space — was forced to pee his pants on the launchpad in 1961.

NASA quickly realized that the lack of bathroom planning presented a messy problem, but solutions weren't easy. A variety of makeshift solutions were sent into space over the years, including pee bags, roll on "cuffs," diapers, toilet seats with straps, and $19 million commodes.

After the Apollo missions ended in 1975, engineers described defecation and urination as the "bothersome aspects of space travel." However, contraptions for "going" while weightless have gotten a little more comfortable since then, and astronauts are now generally good at keeping waste from floating around.

Still, retired astronaut Peggy Whitson, who logged a record-breaking 665 days in space for NASA, has said that going to the bathroom in space was her least favorite part of working in zero gravity.

Here's the full story of how astronauts have relieved themselves in space, from 1961 to now: