The first thief can suggest to kill 4 low ranking thieves and divide the gold among all the rest. Then 5 thiefs will agree to the plan. Then the first thief will want to kill some more thiefs. Again, a few thiefs will agree. Then the 1st thief will have all the gold