LearnPy Hub
← Arena
IntermediateRating 1100

Longest Streak of Heads

A coin was tossed many times (H or T). Print the longest streak of H and the longest streak of T, separated by a space.

Input

One string of H and T.

Output

Two integers.

Sample 1

Input
HHTHHHT
Output
3 1

Sample 2

Input
TTTT
Output
0 4
solution.py
Output appears here
Longest Streak of Heads · Python Arena problem · LearnPy Hub