Oscar is a professional button masher in Duel Masters. Oscar utilizes two elements, earth and fire, in his attacking moves. Combo moves in Duel Masters are created by repeatedly inputting a sequence of moves. Oscar mashes so many buttons that he does not know what combo he used, however, there are naming rules that can allow him to figure out. Sequences of moves append a word to the end of the combo name. Inputs are read by the game console from the left to right and the combo name is determined based on the following rules, where f
denotes a fire move and e
denotes an earth move:
eee
will appendmountain
ee
will appendboulder
e
will appendsolid
fff
will appendflare
ff
will appendblazing
f
will appendfirey
Each move will only count towards a singular adjective. Longer sequences of moves will be prioritized ahead of shorter sequences so when ee
is inputted, the console will prioritize boulder
over two solid
s. If more than four of the same character is repeated in a row, the console will attempt to make the largest groups first, ffff
will append flare firey
.
Additionally, there is a special naming convention that will be prioritized ahead of the others.
fe
oref
will appendmolten
Finally, a noun will be appended depending on the type of the final move.
- Append
barrage
if the final move ise
- Append
onslaught
if the final move isf
As Oscar is unable to keep track of his moves he has asked for your help. Can you help him figure out the combo name?
Input Specification
The first line contains an integer
The next line contains a string with characters, the type of move inputted.
Output Specification
Output the name of the combo.
Subtasks
Subtask 1 (5%)
Subtask 2 (95%)
No further constraints.
Sample Input 1
3
efe
Sample Output 1
molten solid barrage
Sample Input 2
6
eeeeff
Sample Output 2
mountain molten firey onslaught
Comments