He scraped the test set, then encoded the correct answer in the id.
If one can excuse scraping the data to build a better model, I can't see how one can excuse this.
He wasn't really making predictions at all, just looking up the answer.
And the goal really is a prediction system, not something that looks up previously known answers.