PYTHON Repetitions - CSES Introductory Problems #3

Published: 25 May 2020
on channel: Bunny Heist
1,036
14

https://cses.fi/problemset/task/1069



GitHub: https://github.com/BunnyHeist/CSEC





You are given a DNA sequence: a string consisting of characters A, C, G, and T. Your task is to find the longest repetition in the sequence. This is a maximum-length substring containing only one type of character.

Input

The only input line contains a string of n characters.

Output

Print one integer: the length of the longest repetition.

Constraints

1≤n≤106


Example

Input:
ATTCGGGA

Output:
3


On this page of the site you can watch the video online PYTHON Repetitions - CSES Introductory Problems #3 with a duration of hours minute second in good quality, which was uploaded by the user Bunny Heist 25 May 2020, share the link with friends and acquaintances, this video has already been watched 1,036 times on youtube and it was liked by 14 viewers. Enjoy your viewing!