Wrote program to solve hexus.