joc puzzle logic