If Actual arrangement
21222,22122,22212
Logicians assumed cases
11222,12122,12212 in,21122,21212,22112 in this case last person would have said that he has 2 hats (since least count + max 2 hats on head) evaluates to two hats on last head
21222,22122,22212 butsince in assumed arrangement since last person didnt said anything first person can predict he has 2 hats
in this way game completes
But if actual arrangment is
12222,22221 then first and last logicians may assume following arrangement as well
12221,12221 respectively so game do not completes