Template for the missionaries problem.