Under construction

Still being built. Things may change

Catalan Game

Time limit1sMemory limit1024 MB

Level

Not classified yet

Solved
No attempts yet

Problem

A parenthesis string is a string made only of open parentheses ( and close parentheses ). A correct parenthesis string is defined by the following rules.

  • The empty string is a correct parenthesis string.
  • If SS is a correct parenthesis string, then (S)(S) is also a correct parenthesis string.
  • If SS and TT are correct parenthesis strings, then STST, the concatenation of the two, is also a correct parenthesis string.

Any parenthesis string that cannot be built by this process is not a correct parenthesis string.

Junhui recently learned that the number of correct parenthesis strings of length 2n2n is the Catalan number CnC_n. Junhui loves correct parenthesis strings, and is upset that they appear too rarely among all parenthesis strings.

Jimin wants to comfort Junhui by showing that there are plenty of correct parenthesis strings. To do so, Jimin wants to win the following game against Junhui.

You are given an incorrect parenthesis string SS of length NN. The two players take turns removing either the first character or the last character of SS. They continue until there are no characters left to remove. If at some point during the game SS becomes a non-empty correct parenthesis string, Jimin wins. If no such moment occurs before the game ends, Junhui wins.

Jimin moves first. Given NN and SS, determine who wins if both players always play optimally.

Input

The first line contains the length NN of the parenthesis string.

The second line contains the parenthesis string SS.

Output

Print the name of the winner when both players play optimally.

Print jimin if Jimin wins, and junhui if Junhui wins.

Constraints

  • 1≤N≤5×1051\leq N\leq 5\times 10^{5}
  • ∣S∣=N|S| = N
  • Every character of SS is ( or ).
  • SS is not a correct parenthesis string.

Examples2

  1. Example 1

    Input
    4
    ())(
    
    Expected output
    junhui
    
  2. Example 2

    Input
    7
    (()()((
    
    Expected output
    jimin