The Doctor is sentenced to life imprisonment at a lunar penal colony while Jo encounters an old enemy.