• [K] Brick Game

  • 时间限制: 1000 ms 内存限制: 65535 K
  • 问题描述
  • Today 8Mao and Hungar decide to play a brick game in Minecraft.

    They build a wall together, but the height of each unit of the wall may be different.

    And then they break the wall in turns.
    But there's two rules they can choose in each turn:

    Break any number (At least 1) of bricks on any one unit of the wall.

    Choose a unit that all the bricks were already broken and then break all the bricks behind this unit.

    8Mao is generous, so he lets Hungar take the first turn. Assume 8Mao and Hungar are smart enough and Hungar wants to know whether he can win this game.


    The player who breaks all the bricks will win the game.


  • 输入
  • This problem contains several cases, ends with EOF.
    Each case only contains one line that has one string S with only numbers.
    S[i] indicates the height of ith unit and the length of S will not exceed 6.
  • 输出
  • For each case, you should tell Hungar whether he can win this game. If he can, output “Hahaha”, otherwise output “Papapa”.
  • 样例输入
  • 01198
    884577
    
  • 样例输出
  • Hahaha
    Hahaha
    
  • 提示
  • 来源
  • cjl
  • 操作

显示春菜