Find longest consecutive chain where last letter of word = first letter of next (case-insensitive).
Write a complete program: read the input with input() and print the result with print().
input()
print()
Input
1 Apple,Elephant,Tiger,Rat
Output
4