Under construction

Still being built. Things may change

Rubber Duck Debugging

Interview

Time limit1sMemory limit512 MB

Summary
Track a count of unsolved problems: '문제' adds one, '고무오리' removes one or adds two when the count is zero, then report whether the count is zero.
Level

Easy3 of 10

Topics
Implementation, Simulation, Stack
Solved
No attempts yet

Problem

Sujin is having trouble solving problems. Minwoo prepared a rubber duck to help her with problem solving. The rubber duck Minwoo prepared has a mysterious ability: it solves the problem she was most recently working on. Let us help Sujin solve problems with the mysterious rubber duck.

The rubber duck is used as follows.

  • Shout "고무오리 디버깅 시작".
  • Start solving problems.
  • When you receive the rubber duck, it solves the problem you were most recently working on.
  • Shout "고무오리 디버깅 끝" to end the problem-solving session.

The rubber duck has one fatal flaw. If you use it when there is no problem to solve, it adds two problems as a penalty.

Input

The first line contains "고무오리 디버깅 시작". From the second line onward, either "고무오리" or "문제" is given. This repeats until "고무오리 디버깅 끝" is given. The input has at most 102 lines.

Output

When rubber duck debugging ends, print "고무오리야 사랑해" if Sujin solved every problem, and print "힝구" if at least one problem remains.

Examples4

  1. Example 1

    Input
    고무오리 디버깅 시작
    문제
    고무오리
    문제
    문제
    고무오리
    고무오리
    고무오리 디버깅 끝
    
    Expected output
    고무오리야 사랑해
    
  2. Example 2

    Input
    고무오리 디버깅 시작
    고무오리
    고무오리
    고무오리
    고무오리 디버깅 끝
    
    Expected output
    고무오리야 사랑해
    
  3. Example 3

    Input
    고무오리 디버깅 시작
    문제
    문제
    고무오리
    고무오리
    고무오리
    문제
    고무오리
    문제
    고무오리
    고무오리
    고무오리
    고무오리 디버깅 끝
    
    Expected output
    고무오리야 사랑해
    
  4. Example 4

    Input
    고무오리 디버깅 시작
    고무오리
    고무오리 디버깅 끝
    
    Expected output
    힝구