Implemented initial solver (rule 3/4)