Definitely the i5 9600K.... Look at any benchmark, any comparison, 9600K performs much better than the 7700K.... But if you can, you can buy the 8700K...
But as per as your question, 9600K is fairly better
And BTW, the 7th gen (Kay Lake) is dead...
Even the i3-8350K beats the i7-7700K by a bit...