TCL get the last line with consecutive pattern : Hi I have a pattern in a line and I want to get the last line if there are consecutive occurrence in the file.

example file:
apple 1
banana 5
banana 6
apple 2
apple 5
apple 7
banana 9

expected output:
apple 1
banana 6
apple 7
banana 9

Thanks in advance