Write a story about a scientist who invents a time machine but accidentally travels to the distant future where humanity is on the brink of extinction