Input (grade 13): In Star Wars Episode I: The Phantom Menace, set 32 years before Star Wars Episode IV: A New Hope, Palpatine is introduced as the senior Galactic Senator from the planet Naboo.
Output (grade 7): In Episode I The Phantom Menace, he is a Senator from the planet of Naboo.