PROGRAMMING:Polygon game
This topic gives a polygon with n vertices. Each vertex is marked with a number to represent the value of the point. Each edge is marked with "+" to represent addition or "*" to represent multiplication. These edges are numbered from 1 to n. Figure 1 shows a polygon with n = 4.

###Rules of the game
1. First remove an edge.
2. Select an edge e and two vertices V1 and V2 connected with edge e, and replace them with a new vertex. The value of the new vertex is the result of the operator marked on edge e's operation on the values of V1 and V2.
3. Repeat step 2 until there is only one vertex left. The value on this vertex is the game score.

###Input format:
There are two lines of input data, the first line is the number n (3 < = n < = 50), the second line is to give the edge operator (the letter T for addition, the letter X for multiplication) and the value of the vertex, separated by spaces.
###Output format:
The first line outputs the maximum score.
The second line is output. The first step of the game is to remove which edge may make the result score the highest. If there are multiple possibilities, all of them will be output. There is a space after each number.
###Output format:
Please describe the output format here. For example, for each group of inputs, output the value of a + B in one line.
###Input example:
This example is the same as the example in the figure. The first line indicates n = 4, the second line indicates that the symbol on the first edge is addition, the vertex value between the first edge and the second edge is - 7, the symbol on the second edge is addition, the vertex value between the second edge and the third edge is 4, and so on.
```in
four
t -7 t 4 x 2 x 5
```
###Output example:
```out
thirty-three
1 2
```
answer:If there is no answer, please comment

###Rules of the game
1. First remove an edge.
2. Select an edge e and two vertices V1 and V2 connected with edge e, and replace them with a new vertex. The value of the new vertex is the result of the operator marked on edge e's operation on the values of V1 and V2.
3. Repeat step 2 until there is only one vertex left. The value on this vertex is the game score.

###Input format:
There are two lines of input data, the first line is the number n (3 < = n < = 50), the second line is to give the edge operator (the letter T for addition, the letter X for multiplication) and the value of the vertex, separated by spaces.
###Output format:
The first line outputs the maximum score.
The second line is output. The first step of the game is to remove which edge may make the result score the highest. If there are multiple possibilities, all of them will be output. There is a space after each number.
###Output format:
Please describe the output format here. For example, for each group of inputs, output the value of a + B in one line.
###Input example:
This example is the same as the example in the figure. The first line indicates n = 4, the second line indicates that the symbol on the first edge is addition, the vertex value between the first edge and the second edge is - 7, the symbol on the second edge is addition, the vertex value between the second edge and the third edge is 4, and so on.
```in
four
t -7 t 4 x 2 x 5
```
###Output example:
```out
thirty-three
1 2
```
answer:If there is no answer, please comment