added a stack reversal method (to reverse the dequeue when the remainingsolutionset keeps recycling)
printing output. Still trying to figure out a workaround to resolve the looparound problem;
not reversing the stack anymore
added a counter to stop indefinite loops when no solution is found