Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

The problem statement has recently been changed. View the changes.

×
A. One-dimensional Japanese Crossword

time limit per test

1 secondmemory limit per test

256 megabytesinput

standard inputoutput

standard outputRecently Adaltik discovered japanese crosswords. Japanese crossword is a picture, represented as a table sized *a* × *b* squares, and each square is colored white or black. There are integers to the left of the rows and to the top of the columns, encrypting the corresponding row or column. The number of integers represents how many groups of black squares there are in corresponding row or column, and the integers themselves represents the number of consecutive black squares in corresponding group (you can find more detailed explanation in Wikipedia https://en.wikipedia.org/wiki/Japanese_crossword).

Adaltik decided that the general case of japanese crossword is too complicated and drew a row consisting of *n* squares (e.g. japanese crossword sized 1 × *n*), which he wants to encrypt in the same way as in japanese crossword.

Help Adaltik find the numbers encrypting the row he drew.

Input

The first line of the input contains a single integer *n* (1 ≤ *n* ≤ 100) — the length of the row. The second line of the input contains a single string consisting of *n* characters 'B' or 'W', ('B' corresponds to black square, 'W' — to white square in the row that Adaltik drew).

Output

The first line should contain a single integer *k* — the number of integers encrypting the row, e.g. the number of groups of black squares in the row.

The second line should contain *k* integers, encrypting the row, e.g. corresponding to sizes of groups of consecutive black squares in the order from left to right.

Examples

Input

3

BBW

Output

1

2

Input

5

BWBWB

Output

3

1 1 1

Input

4

WWWW

Output

0

Input

4

BBBB

Output

1

4

Input

13

WBBBBWWBWBBBW

Output

3

4 1 3

Note

The last sample case correspond to the picture in the statement.

Codeforces (c) Copyright 2010-2021 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Mar/02/2021 02:23:40 (g2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|