Separate the following sentence into its components.
Input: He went to the park to play with the dog.
He (subject) went (verb) to (preposition) the (determiner) park (noun) to (preposition) play (verb) with (preposition) the (determiner) dog (noun).
He (noun phrase) went (verb) to the park (location) to play (verb) with (noun phrase) the dog (noun).