Awkward situation#11532

Awkward situation

1 second
256 megabytes
Medium

Oh no! The organizing committee of the competition mixed up everything and instead of incorrect variants of conditions the poster with the inscription "BSUIROPEN" went into the shredder.

In addition to this poster, other posters got into the shredder. So you have pieces, on each of which is written some text consisting of capital letters of the Latin alphabet. Now you have a new and very important mission: you need to tape some pieces together to make a new poster with the inscription "BSUIROPEN".

In fact, the organizing committee doesn't know for sure whether the poster got into the shredder or not, but you still need to make a new one (just in case). And also, it is necessary to save tape, so the new poster should be made of the minimum number of pieces.

Input

The first line specifies a single integer n~(1 \le n \le 10^5) — the number of pieces.

The next lines specify the strings written on the pieces.

It is guaranteed that the total length of the strings does not exceed 10^5.

Output

Output a single integer — the minimum number of pieces that can be used to make a poster with the inscription "BSUIROPEN".

If such a poster cannot be made, output "" (without quotes).

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading