Solver.java (New Setup)