sherlock and squares solution