Bob & His Crops
Bob the farmer is harvesting potatoes from his long field of length N, filled with potatoes and carrots. Unfortunately, some pesky weeds have also grown in the field. Bob wants to harvest as many crops in a row, without harvesting any weeds. Can you output the number of potatoes and carrots he will harvest?
If there are multiple answers, output the one earliest in the input.
The first line will contain one integer, \(N (1 \leq N \leq 10^6)\), the length of Bob's field.
The next line will contain one string, containing characters
w, representing potatoes, carrots, and weeds, respectively.
Output the number of potatoes and carrots Bob will harvest, respectively, on one line separated by a space.
Sample Input 1
Sample Output 1
Sample Input 2
Sample Output 2