{"raw_statement":[{"iden":"statement","content":"Bob has received a text message from his girlfriend Alice. The message consists only of colons (\"_:_\") and brackets (\"_(_\" and \"_)_\"). Two consecutive characters in the message form an emoticon if one of them is a colon and the other one is a bracket. If the bracket's inner side faces the colon, the emoticon is a smiley; otherwise it is a frowney. So, \"_:)_\" and \"_(:_\" are smilies, and \"_:(_\" and \"_):_\" are frownies. One character can belong to two emoticons: for example, there are both a smiley and a frowney in the message \"_):)_\".\n\nUnfortunately, Bob has trouble understanding the message. He can only find out Alice's mood based on the number of emoticons in the message: \n\nHelp Bob determine how does Alice feel!\n\nThe first line contains a single integer n, the length of the message (1 ≤ n ≤ 105). The next line contains the message, a string consisting of n characters. Each of the characters is either \"_:_\", \"_(_\" or \"_)_\".\n\nIn a single line, output either \"_HAPPY_\", \"_BORED_\" or \"_SAD_\" corresponding to Alice's mood.\n\n"},{"iden":"input","content":"The first line contains a single integer n, the length of the message (1 ≤ n ≤ 105). The next line contains the message, a string consisting of n characters. Each of the characters is either \"_:_\", \"_(_\" or \"_)_\"."},{"iden":"output","content":"In a single line, output either \"_HAPPY_\", \"_BORED_\" or \"_SAD_\" corresponding to Alice's mood."},{"iden":"examples","content":"Input10:)))))))))OutputHAPPYInput1:OutputBOREDInput8)::(:():OutputSAD"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z} $ be the length of the message.  \nLet $ s = s_1 s_2 \\dots s_n $ be a string over the alphabet $ \\{ \\texttt{:}, \\texttt{(}, \\texttt{)} \\} $.\n\n**Constraints**  \n$ 1 \\le n \\le 10^5 $\n\n**Definitions (Emoticons)**  \nFor each $ i \\in \\{1, \\dots, n-1\\} $, the pair $ (s_i, s_{i+1}) $ forms an emoticon if one character is `:` and the other is `(` or `)`.  \n- It is a **smiley** if: $ (s_i, s_{i+1}) = (\\texttt{:}, \\texttt{)}) $ or $ (s_i, s_{i+1}) = (\\texttt{(}, \\texttt{:}) ) $  \n- It is a **frowney** if: $ (s_i, s_{i+1}) = (\\texttt{:}, \\texttt{(}) $ or $ (s_i, s_{i+1}) = (\\texttt{)}, \\texttt{:}) ) $\n\nLet:  \n- $ H = \\# \\{ i \\in \\{1, \\dots, n-1\\} \\mid (s_i, s_{i+1}) \\text{ is a smiley} \\} $  \n- $ F = \\# \\{ i \\in \\{1, \\dots, n-1\\} \\mid (s_i, s_{i+1}) \\text{ is a frowney} \\} $\n\n**Objective**  \nOutput:  \n- $ \\texttt{HAPPY} $ if $ H > F $  \n- $ \\texttt{SAD} $ if $ H < F $  \n- $ \\texttt{BORED} $ if $ H = F $","simple_statement":"Count the number of smileys (\":)\" or \"(:\") and frownies (\":(\" or \"):\") in the message.  \nIf there are more smileys than frownies, output \"HAPPY\".  \nIf there are more frownies than smileys, output \"SAD\".  \nIf they are equal, output \"BORED\".","has_page_source":false}