Recover product key

Solution
If a licensed version of 10 was installed you can just install 10 and it should activate itself based on the systems hardware ID. But if you want to reinstall 8 you would need to buy a new key.