Girls Invitational '18 J1 - Not Not Very Very

View as PDF

Submit solution

Points: 3
Time limit: 2.0s
Memory limit: 64M

Problem type

Olivia strongly dislikes her co-worker Noah. This morning, Noah asked Olivia what she thinks of him. In response, she has decided to send a message with a long string, \(S\ (1 \le |S| \le 400)\), of nots and verys to confuse him about how she feels. However, Olivia is very particular about the words she chooses and, thus, her message must fulfill these requirements:

  • Olivia must use the same number of nots and verys in her response in order to maintain balance.
  • Olivia also wants there to be an odd number of nots because she does NOT like Noah.
  • Olivia wants her message to be short as possible, but she also cannot erase what she has already written.

Input Specification

You will be given part of the message Olivia has already written (nots and verys).
Each not or very is separated by a single space.

Output Specification

Output the nots that must be added, followed by the verys so that the message fulfills the requirements above.

Sample Input

not very very very very not not very very

Sample Output

not not not not very

Comments

There are no comments at the moment.