Three Ships interview question

See above summary.