Solver for four pics