A coin has a probability of $a/b$ of landing on heads (H) and a probability of $1-a/b$ of landing on tails (T). Now, a child named TT starts playing a coin-tossing game and records the result of each toss, denoting heads as H and tails as T, resulting in a sequence like HTHHT.... She suddenly wonders: if the probability of heads and tails is $1/2$, how many tosses are expected to see the target sequence HT? After thinking for a second, she realizes that if the first toss is T, she still needs the expected number of tosses to get HT; if the first toss is H, she only needs the expected number of tosses to get T, which is clearly 2. Letting $x$ be the expected number of tosses to get HT, she obtains the equation: $$x=1+(1/2 \cdot x + 1/2 \cdot 2)$$ Solving this gives $x=4$, so the expected number of tosses to get HT is 4.
After solving this simplified problem, she begins to think about the general case where the probabilities of heads and tails are not necessarily equal, and the target sequence is not necessarily HT. However, after a long period of deep thought, she remains stuck, so she turns to you for help.
Input
The first line contains two integers $a$ and $b$, with meanings as described above. The next line contains a string $S$ consisting only of 'H' and 'T', representing the target sequence.
Output
Output a single line in the format $p/q$, where $p$ and $q$ are coprime positive integers representing the expected number of tosses required to obtain the target sequence $S$. Note: If $q$ is 1, do not omit the $/1$.
Examples
Input 1
1 2 HT
Output 1
4/1
Note
See the problem description.
Constraints
| $a$ | $b$ | $ | S | $ |
|---|---|---|---|---|
| 1 | $=1$ | $=2$ | $=3$ | |
| 2 | $=1$ | $=2$ | $=3$ | |
| 3 | $=1$ | $=2$ | $\le 10$ | |
| 4 | $=1$ | $=2$ | $\le 20$ | |
| 5 | $ | $\le 10$ | $\le 15$ | |
| 6 | $ | $\le 30$ | $\le 50$ | |
| 7 | $ | $\le 50$ | $\le 100$ | |
| 8 | $ | $\le 100$ | $\le 300$ | |
| 9 | $ | $\le 100$ | $\le 500$ | |
| 10 | $ | $\le 100$ | $\le 1000$ |