Writing a program to solve the problem would take 5 or 10 minutes for an average programmer. However, the amount of time the program would need to run is, well, a LONG LONG LONG time.
There are 9.33 x 10^157 different permutations. The only way to be certain of the final answer is to check all of the permutations. Well, with a little thought though, you'll be quick to point out that there must be TWO solutions - one is simply running the trip in the reverse direction. So, you only need to check 4.666 x 10^157 permutations. Unfortunately, that 10^157 number is still the same. It's a big number. More (far far far far far more) than all the atoms in the known universe. In fact, it's only 3 orders of magnitude from being the number of particles in as many identical universes as there are particles in this universe.
Let's say you could test 1 quadrillion possibilities per second. No computer, and I think that includes super computers, comes anywhere close. But for the sake of argument, 1 quadrillion possibilities per second. That's 10^15 possibilities per second. Divide. That's 10^142 seconds before you're done. Longer than the universe is going to be around. The universe has been around for less than 10^18 seconds (to put it in perspective.)
Of course, you can streamline the process by using something similar to the Greedy algorithm posted above, then once you have a possibly somewhat short answer, you can stop calculating distances once they exceed that value (or a new shortest distance value.)
You might even be able to trim the computation down to something that can be calculated within a few hundred years, but that might be generous.