Triangle Puzzle Solver