How is it a a grammatically correct sentence?
https://en.wikipedia.org/wiki/Buffalo_buffalo_Buffalo_buffalo_buffalo_buffalo_Buffalo_buffalo
The sentence is unpunctuated and uses three different readings of the word "buffalo". In order of their first use, these are: