Time limit: 1 second
Memory limit: 256 megabytes
----------
The selection phase of Pardis Code has been entrusted to Romina and Ali. They are going to hold a tug-of-war competition, and each will select a team from the participants. All members of the winning team advance to the final round.
Team selection proceeds as follows: First, Romina selects one participant. Then, Ali chooses two people from the remaining participants. From this point onward, the selection turns continue alternately (starting with Romina), and each person selects two participants each time until no one is left to choose.
(If, in the end, the number of remaining participants is less than the required number for selection, Romina or Ali will select only one person in their final turn.)
The goal of Romina and Ali is to form the strongest possible team; therefore, both make their choices in the most optimal and intelligent way possible.
After team selection, Romina decides to bribe a number of members of the opposing team to withdraw in her favor and be passive in the tug-of-war. What is the minimum number of members Romina must bribe so that the total weight of her team is greater than Ali's team?
And conversely, if Ali wants to do this, what would the answer be? State the method of bribing for Romina or Ali to win.
**The weights of all participants are distinct.**
# Input
The first line contains a natural number $n$, representing the total number of participants.
The second line contains $n$ natural numbers, representing the weights of the participants.
The third line contains one of the strings `"romina"` or `"ali"`, which specifies for whom the bribe analysis should be performed.
$$2 \leq n , a_i \leq 10^5$$
# Output
The first line should print the minimum number of people the targeted individual must bribe.
The second line should list the weights of these individuals in order from **heaviest to lightest**.
# Examples
## Sample Input 1
```
5
1 4 6 9 2
romina
```
## Sample Output 1
```
0
```
## Sample Input 2
```
4
1 4 6 9
romina
```
## Sample Output 2
```
1
6
```
## Sample Input 3
```
4
5 7 3 1
ali
```
## Sample Output 3
```
1
1
```
Post an answer to this question
You currently do not have access.