Encoding TSP problem using Z3 solver