Answer:
Preposition.
Step-by-step explanation:
Parts of speech are characterized as the lexical items(noun, pronoun, adjective, verb, adverb, etc.) that are assigned/employed in sentence as per their syntactical functions.
'Preposition' is elucidated as the part of speech that functions to relate a phrase, pronoun, or noun to the other elements of the sentence. It may function either as an adverb or as an adjective.
In the given sentence, 'IN' is the 'preposition' that links the noun('the sun') to the other components of the sentence. It is indicating the position('in the sun') where the 'teachers and students' wish to be during their vacation.