Problem:
Score : 100 points

Problem Statement

A Hitachi string is a concatenation of one or more copies of the string hi.

For example, hi and hihi are Hitachi strings, while ha and hii are not.

Given a string S, determine whether S is a Hitachi string.

Constraints

The length of S is between 1 and 10 (inclusive).

S is a string consisting of lowercase English letters.

Input

Input is given from Standard Input in the following format:

S

Output

If S is a Hitachi string, print Yes; otherwise, print No.

Sample Input 1

hihi

Sample Output 1

Yes

hihi is the concatenation of two copies of hi, so it is a Hitachi string.

Sample Input 2

hi

Sample Output 2

Yes

Sample Input 3

ha

Sample Output 3

No

Solution in Python (3.4.3) (judge verdict: Wrong Answer)

import unittest
from io import StringIO
import sys


def resolve():
    S = input()
    c = list(S)
    if len(c) == 1 or len(c) % 2 != 0:
        print('No')
        return

    if len(c) == 2 and S != 'hi':
        print('No')
        return

    for i in range(0, len(c) - 2, 2):
        if ''.join(c[i:i + 2]) != 'hi':
            print('No')
            return
    print('Yes')


# resolve()


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """hihi"""
        output = """Yes"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """hi"""
        output = """Yes"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """ha"""
        output = """No"""
        self.assertIO(input, output)


if __name__ == "__main__":
    unittest.main()