Hey, i read a very interesting exercise in an old mathbook and i really dont know how to solve it..

John and Nancy get homework from their math teacher. John forgets to write the polynomial down. He asks nancy what it is but she doesn't want to tell him right away. She says: for every x-value you give me i'll give you the y-value.

John doesnt know the grade of the polynominal and he wants to get it as fast as possible. What's the shortest way and can you prove this?

Can someone solve this or help me solving it?

Thanks