A. Load Distribution
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

And so the competition has begun!

The team consisting of Aidar, Begimai, and Viktor rushed to read the conditions of all $$$n$$$ problems to find the easiest ones.

The team agreed to read the problems in the following manner:

  • Aidar reads starting from problem number $$$1$$$ and moves towards problem $$$n$$$.
  • Viktor reads starting from problem number $$$n$$$ and moves towards problem $$$1$$$.
  • Begimai starts reading from a fixed problem $$$s$$$ between $$$1$$$ and $$$n$$$, after which she starts moving either towards problem $$$1$$$ or towards problem $$$n$$$ (the direction is also fixed).

It is known that

  • each participant reads each problem in the same amount of time.
  • a participant will stop if they reach a problem that has already been read by another team member.
  • if two participants are supposed to read the same problem, they will read it together for reliability.

Determine how many problems each team member will read.

Input

The first line contains an integer $$$n$$$ $$$(3 \le n \le 15)$$$ — the number of problems in the competition.

The second line contains an integer $$$s$$$ $$$(1 \lt s \lt n)$$$ — the problem from which Begimai starts reading.

The third line specifies Begimai's reading direction:

  • L, if Begimai reads the problems towards problem $$$1$$$.
  • R, if Begimai reads the problems towards problem $$$n$$$.
Output

In a single line, output three integers $$$a$$$, $$$b$$$, and $$$c$$$ $$$(1 \le a, b, c; a + b + c = n$$$ or $$$a + b + c = n + 1)$$$:

  • $$$a$$$ — how many problems Aidar will read;
  • $$$b$$$ — how many problems Begimai will read;
  • $$$c$$$ — how many problems Viktor will read.
Examples
Input
12
9
L
Output
5 5 3
Input
8
7
R
Output
6 1 1
Note

First test example

There are a total of $$$12$$$ problems in the competition.

Begimai started reading from problem $$$9$$$ and began moving towards problem $$$1$$$.

  • Aidar managed to read problems $$$1$$$, $$$2$$$, $$$3$$$, $$$4$$$, $$$5$$$ — a total of $$$5$$$ problems.
  • Begimai managed to read problems $$$9$$$, $$$8$$$, $$$7$$$, $$$6$$$, $$$5$$$ — a total of $$$5$$$ problems.
  • Viktor managed to read problems $$$12$$$, $$$11$$$, $$$10$$$ — a total of $$$3$$$ problems.

Second test example

There are a total of $$$8$$$ problems in the competition.

Begimai started reading from problem $$$7$$$ and began moving towards problem $$$8$$$.

  • Aidar managed to read problems $$$1$$$, $$$2$$$, $$$3$$$, $$$4$$$, $$$5$$$, $$$6$$$ — a total of $$$6$$$ problems.
  • Begimai managed to read problem $$$7$$$ — a total of $$$1$$$ problem.
  • Viktor managed to read problem $$$8$$$ — a total of $$$1$$$ problem.