James' puzzle solution