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 (Python):
S = input()
if len(S) % 2 == 0:
    if S == "hi":
        print("Yes")
    elif S == "hihi":
        print("Yes")
    elif S == "hihihi":
        print("Yes")
    elif S == "hihihihi":
        print("Yes")
    elif S == "hihihihihi":
        print("Yes")
    else:
        print("No")
else:
    print("No")

Solution (Python):
import sys
a=list(input())
i=0
if len(a)%2!=0:
    print('No')
    sys.exit()
for j in range(len(a)//2):
    if a[i]=='h' and a[i+1]=='i':
        print('Yes')
        sys.exit()
    i+=2
print('No')

Solution (Python):
s=str(input())
for i in range (6):
    if s =="hi"*i:
        print("Yes")
        exit()
for i in range (6):
    if s !="hi"*i:
        print("No")
        break

Solution (Python):
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate
import sys
import bisect
import string
import math
import time


def I(): return int(input())


def S(): return input()


def MI(): return map(int, input().split())


def MS(): return map(str, input().split())


def LI(): return [int(i) for i in input().split()]


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


def input(): return sys.stdin.readline().rstrip()


def print_matrix(mat):
    for i in range(len(mat)):
        print(*mat)


def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end)


YNL = {False: 'No', True: 'Yes'}
YNU = {False: 'NO', True: 'YES'}
MOD = 10**9+7
inf = float('inf')
IINF = 10**10
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']

show_flg = False



def main():
    s = S()
    count = 0

    if len(s) % 2 == 1:
        print('No')
        return

    for i in range(0, len(s), 2):
        if s[i] == 'h' and s[i+1] == 'i':
            
            count += 1

    if count == len(s) // 2:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

Solution (Python):
S = input()
if set(S[0::2]) == set('h') and set(S[1::2]) == set('i') and len(S) % 2 == 0:
    ans = True
else:
    ans = False
if ans:
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()

isHitachi = True
for i in range((len(S) + 1)//2):
  if S[2*i:2*i+2] != "hi":
    isHitachi =False
    
print("Yes" if isHitachi else "No")

Solution (Python):
s=input()
ans=1
if len(s)%2==1:
	ans=0
else:
	i=0
	while i<len(s):
		if s[i:i+2]!="hi":
			ans=0
			break
		i+=2
if ans:
	print("Yes")
else:
	print("No")

Solution (Python):
S = input()
ans = "Yes"
for i in range(0, len(S)-1, 2):
    if S[i] == "h" and S[i+1] == "i":
        continue
    ans = "No"
if len(S)%2 == 1:
    ans = "No"
print(ans)

Solution (Python):
S=input()
ans="Yes"
l=len(S)
if(l % 2 != 0):
    ans="No"
else:
    n = l // 2
    for i in range(n):
        if(S[2*i]!="h"):
            ans="No"
        if(S[(2*i)+1]!="i"):
            ans="No"
print(ans)

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

























def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

inf = float('inf')
mod = 1000000007




def main():
	S = input()
	S = S[:-1]
	tmp = S.split("hi")

	flg = True
	for i in tmp:
		if i != "":
			flg = False
			break

	if flg == True:
		print("Yes")
	else:
		print("No")
	

	









def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res


def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def egcd(a, b):
    if a == 0:
        return b, 0, 1
    else:
        g, y, x = egcd(b % a, a)
        return g, x - (b // a) * y, y



def H(n, r, mod=10**9+7):
	
	
    return combination(n+r-1, r, mod)

class Combination:
    """
    O(n)の前計算を1回行うことで，O(1)でnCr mod mを求められる
    n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms)
    使用例：
    comb = Combination(1000000)
    print(comb(5, 3))  
    """
    def __init__(self, n_max, mod=10**9+7):
        self.mod = mod
        self.modinv = self.make_modinv_list(n_max)
        self.fac, self.facinv = self.make_factorial_list(n_max)

    def __call__(self, n, r):
        return self.fac[n] * self.facinv[r] % self.mod * self.facinv[n-r] % self.mod

    def make_factorial_list(self, n):
        
        
        fac = [1]
        facinv = [1]
        for i in range(1, n+1):
            fac.append(fac[i-1] * i % self.mod)
            facinv.append(facinv[i-1] * self.modinv[i] % self.mod)
        return fac, facinv

    def make_modinv_list(self, n):
        
        modinv = [0] * (n+1)
        modinv[1] = 1
        for i in range(2, n+1):
            modinv[i] = self.mod - self.mod//i * modinv[self.mod%i] % self.mod
        return modinv

if __name__ == "__main__":
	main()

Solution (Python):
S = input()

while len(S) > 1:
    if S[0] =='h' and S[1] == 'i':
        S = S[2:]
    else:
        break
if len(S) ==0:
    print('Yes')
else:
    print('No')

Solution (Python):
s = str(input())
hi = ""

if len(s) % 2 == 0:
    for i in range(int(len(s)/2)):
        hi = hi + "hi"
    if s == hi:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Solution (Python):

s = list(input())

if len(s) % 2 == 1:
    print("No")
    exit()
for i in range(0, len(s) - 1, 2):
    
    if not(s[i] == 'h' and s[i + 1] == 'i'):
        print("No")
        exit()
print("Yes")

Solution (Python):
import sys
from collections import defaultdict, Counter, deque
from itertools import accumulate, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right, bisect
from heapq import heappop, heappush
from fractions import gcd
from math import ceil, floor, sqrt, cos, sin, pi
from copy import deepcopy




def main():
    S = input()
    if len(S)%2!=0:
        return "No"
    for i in range(len(S)//2):
        t = i*2
        if S[t:t+2] != "hi":
            return "No"
    return "Yes"

if __name__ == '__main__':
    print(main())

Solution (Python):
s = input()
if len(s)%2 == 0:
    for i in range(len(s)):
        if i%2==0 and s[i] != 'h':
            print("No")
            break
        if i%2==1 and s[i] != 'i':
            print("No")
            break
    else:
        print("Yes")
else:
    print("No")

Solution (Python):
import re
s = input()
r = re.compile(r"^(hi)+$")
if r.match(s):
  print("Yes")
else:
  print("No")

Solution (Python):
import sys
from collections import deque


def input():
    return sys.stdin.readline()[:-1]


def solve():
    S = input()
    if len(S) % 2 != 0:
        print('No')
    else:
        for i in range(len(S) // 2):
            if S[2 * i:2 * i + 2] != 'hi':
                print('No')
                return
        print('Yes')


if __name__ == "__main__":
    solve()

Solution (Python):
s = input()

flag = True
for i in range(len(s)):
    if i%2 == 0:
        if s[i] != "h":
            flag =False
            break
    else:
        if s[i] != "i":
            flag = False
            break

if len(s) == 1 or len(s) % 2 != 0:
    flag=False

if flag:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
ans = "Yes"
if len(s)%2 == 0:
    for i in range(len(s)):
        if i%2 == 0:
            if s[i] != "h":
                ans = "No"
                break
        else:
            if s[i] != "i":
                ans = "No"
                break
else:
    ans = "No"
print(ans)

Solution (Python):
s = input()
if 'hi'== s:
    print('Yes')
elif 'hihi'==s:
    print('Yes')
elif 'hihihi'==s:
    print('Yes')
elif 'hihihihi'==s:
    print('Yes')
elif 'hihihihihi'==s:
    print('Yes')
else:
    print("No")

Solution (Python):
S = input()
if S in ['hi', 'hihi', 'hihihi', 'hihihihi', 'hihihihihi']:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()
if len(s)%2 != 0:
    print('No')
    exit()

idx = 0
while idx <= len(s)-1:
    st = s[idx] + s[idx+1]
    if st != 'hi':
        print('No')
        exit()
    
    idx += 2
print('Yes')

Solution (Python):
s = input()

if s=='hi' or s=='hihi' or s=='hihihi' or s=='hihihihi' or s=='hihihihihi':
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()
ans = ""
flag =  0
for i in range(5):
    ans += "hi"
    if ans == S:
        print("Yes")
        flag += 1
        break
if flag == 0:
    print("No")

Solution (Python):
S = input()

HI = "hi"

if S == "hi" or S == "hihi" or S == "hihihi" or S == "hihihihi" or S == "hihihihihi":
    print("Yes")
else:
    print("No")

Solution (Python):


s = raw_input()
print ['No', 'Yes'][s in [
    'hi'
    ,'hihi'
    ,'hihihi'
    ,'hihihihi'
    ,'hihihihihi'
    ]]

Solution (Python):
S = input()

def hitachi_s(target):
    for i in range(len(target)):
        if i % 2 == 0:
            if target[i:i+2] != "hi":
                return "No"
    return "Yes"

print(hitachi_s(S))

Solution (Python):
S = input()
for i in range(1,11):
  if S == 'hi'*i:
    print('Yes')
    exit()
print('No')

Solution (Python):
S=raw_input()
if S=="hi" or S=="hihi" or S=="hihihi" or S=="hihihihi" or S=="hihihihihi":
    print "Yes"
else:
    print "No"

Solution (Python):
from sys import exit

s = input()

if len(s)%2==1:
    print('No')
    exit()


for i in range(len(s)):
    if i%2==0:
        if s[i]!='h':
            print('No')
            exit()
    else:
        if s[i]!='i':
            print('No')
            exit()
print('Yes')

Solution (Python):
s = input()

v = 'hi'

flg = True

while True:
  if len(s) <= 1:
    if len(s) == 1:
      flg = False
    break
  if s[:2] != v:
    flg = False
    break
  else:
    s = s[2:]

if flg:
  print('Yes')
else:
  print('No')

Solution (Python):
S = input()

if len(S) % 2 == 1:
    print("No")
    exit()

for i in range(0, len(S), 2):
    if S[i] != "h" or S[i+1] != "i":
        print("No")
        exit()

print("Yes")
exit()

Solution (Python):
S = input()
if S in ['hi', 'hihi', 'hihihi', 'hihihihi', 'hihihihihi']:
  print('Yes')
else:
  print('No')

Solution (Python):
s = input()
for i in range(1, 6):
    if s == 'hi' * i:
        print('Yes')
        exit()
print('No')

Solution (Python):

S = str(input())

print("Yes" if len(S.replace("hi", "")) == 0 else "No")

Solution (Python):
s=input()
flag=False
for i in range(1,100):
    if s=="hi"*i:
        flag=True
if flag:
    print('Yes')
else:
    print('No')

Solution (Python):
S=input()
if len(S)%2 != 0:
    print('No')
else:
    x = 0
    for i in range(len(S)):
        if i%2 == 0:
            if S[i] != 'h':
                x = x +1
        else:
            if S[i] != 'i':
                x = x+1
    if x==0:
        print('Yes')
    else:
        print('No')

Solution (Python):
import math
import sys

input = sys.stdin.readline


def main():
    s = input().strip()
    if len(s) % 2 == 1:
        print('No')
        return

    for idx in range(len(s)):
        if idx % 2 == 0 and s[idx] != 'h':
            print('No')
            return
        elif idx % 2 == 1 and s[idx] != 'i':
            print('No')
            return
    print('Yes')


if __name__ == '__main__':
    main()

Solution (Python):
S = input()

prev = 'i'
for s in S:
    if s == 'h' and prev == 'i':
        pass
    elif s == 'i' and prev == 'h':
        pass
    else:
        print('No')
        break
    prev = s
else:
    if prev == "h":
        print('No')
    else:
        print('Yes')

Solution (Python):
S = input()

for i in range(0,len(S),2):
  if not S[i:i+2] == 'hi':
    print('No')
    exit(0)

print('Yes')

Solution (Python):
S = input()

if len(S) % 2 != 0:
    print("No")
else:
    i,flag = 0,True
    while i+1 <= len(S):
        if S[i] == "h" and S[i+1] == "i":
            i += 2
        else:
            flag = False
            break
    if flag:
        print("Yes")
    else:
        print("No")

Solution (Python):
s = input()
s = s.replace("hi","")

if s == "":
  print("Yes")
else:
  print("No")

Solution (Python):
S = list(input())

if len(S) % 2 == 1:
    print("No")
    exit()

i = 0
while i < len(S):
    if S[i] == 'h' and S[i+1] == 'i':
        i += 2
    else:
        print("No")
        exit()

print("Yes")

Solution (Python):
def main():
    import sys
    
    sys.setrecursionlimit(10000000)
    from collections import Counter, deque
    
    from itertools import combinations, permutations
    
    from bisect import bisect_left,bisect_right
    from math import floor, ceil
    

    

    s = list(input())
    a = len(s)
    if a%2==1:
        print('No')
        exit()
    for i, x in enumerate(s):
        if i%2==0:
            if x!='h':
                print('No')
                exit()
        else:
            if x!='i':
                print('No')
                exit()
    print('Yes')


if __name__ == '__main__':
    main()

Solution (Python):
S = input()
if S == "hi" or S == "hihi" or S == "hihihi" or S == "hihihihi" or S == "hihihihihi":
    print("Yes")
else:
    print("No")

Solution (Python):
s = str(input())

if len(s) % 2 != 0:
    ans = ' No'
else:
    ans = 'Yes'
    for i in range(0, len(s), 2):
        if s[i] == 'h' and s[i+1] == 'i':
            pass
        else:
            ans = 'No'

print(ans)

Solution (Python):
a = input()
a = a.replace("hi", "")
if a == "":
    print("Yes")
else:
    print("No")

Solution (Python):

def main():
    s = input()

    result = "No"
    for i in range(1, 6):
        if s == "hi" * i:
            result = "Yes"
            break
    print(result)    

if __name__ == '__main__':
    main()

Solution (Python):
hitachi = ["hi", "hihi", "hihihi", "hihihihi", "hihihihihi"]
S = input()
if S in hitachi:
    print("Yes")
else:
    print("No")

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


def solve(S: str):
    ans = S.split('hi')
    for c in ans:
        if c != '':
            print(NO)
            return
    print(YES)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  
    solve(S)

if __name__ == '__main__':
    main()

Solution (Python):
S = input()

s_length = len(S)


if S == "hi" * int(s_length/2):
    print("Yes")
else:
    print("No")

Solution (Python):
s = list(input())
ans = 'Yes'

for i in range(len(s)):
    if i % 2 == 0:
        if s[i] != 'h':
            ans = 'No'
    else:
        if s[i] != 'i':
            ans = 'No'
      
if len(s) % 2 == 1:
    ans = 'No'
    
print(ans)

Solution (Python):
S = input()
i = 0
while(i<len(S)):
  if i+1 < len(S) and S[i] == 'h' and S[i+1] == 'i':
    i += 2
  else:
    print('No')
    exit()
print('Yes')

Solution (Python):
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
s = l()
c = 0
d = 0
for i in range(len(s)):
    if i%2 == 0 and s[i] == "h":
        c += 1
    else:
        if s[i] == "i":
            d += 1
print("Yes" if c == d and len(s) == c+d else "No")

Solution (Python):
s = input()
s = s.replace("hi", "")

if s == "":
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
if len(s)%2==1:
  print('No')
else:
  if s == 'hi'*(len(s)//2):
    print('Yes')
  else:
    print('No')

Solution (Python):
s = input()

if len(s.replace('hi',''))==0:
  print("Yes")
else:
  print("No")

Solution (Python):
def main():
    S = input()
    hi = 'hi'
    for i in range(1,6):
        if S == hi*i:
            print('Yes')
            return
    print('No')
if __name__ == '__main__':
    main()

Solution (Python):
s1=str(input())
ns1=s1.replace("hi","")

if ns1=="":
    print("Yes")
else:
    print("No")

Solution (Python):
s = str(input())
if len(s)%2 == 1:
    print("No")
    exit()
for i in range(0,len(s),2):
    if s[i] == 'h' and s[i+1] == 'i':
        continue
    else:
        print("No")
        exit()
print("Yes")

Solution (Python):
s=input()
if s=="hi" or s=="hihi" or s=="hihihi"or s=="hihihihi" or s=="hihihihihi":
  print("Yes")
else:
  print("No")

Solution (Python):
s = list(input())
for i, x in enumerate(s):
    if (i % 2 and x != "i") or (i % 2 == 0 and x != "h"):
        print("No"); break
else:
    print("Yes" if len(s) % 2 == 0 else "No")

Solution (Python):


x = input()
y=0
if len(x) % 2 == 1:
    y = 1
    
for i in range(len(x)):
    if i % 2 == 0 :
        if x[i] != 'h':
            y=1
            break
    elif i % 2 ==1:
        if x[i] != 'i':
            y=1
            break

if y ==0:
    print("Yes")
elif y ==1:
    print("No")

Solution (Python):
import re
S = str(input())
pattern = '^(hi)+$'

if re.match(pattern, S):
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()
N = len(S)
out = "Yes"
if N%2==1:
    print("No")
else:
    for i in range(0,int(N//2)):
        if (S[2*i]=="h")and(S[2*i+1]=="i"):
            continue
        else:
            out = "No"
    print(out)

Solution (Python):
s = input()

if len(s)%2 == 1:
  print('No')
else:
  n = int(len(s)/2)
  if s == 'hi'*n:
    print('Yes')
  else:
    print('No')

Solution (Python):
s = input()
hi = "hi"
for i in range(1, 10):
  if (s == hi*i):
    print("Yes")
    exit()
print("No")

Solution (Python):
if __name__ == '__main__':
    from sys import stdin
    input = stdin.readline

    s = input()[:-1]
    if s == 'hi':
        print('Yes')
    elif s == 'hihi':
        print('Yes')
    elif s == 'hihihi':
        print('Yes')
    elif s == 'hihihihi':
        print('Yes')
    elif s == 'hihihihihi':
        print('Yes')
    else:
        print('No')

Solution (Python):

S = input()


if (len(S) % 2 == 1):
    print('No')
    exit()
for i in range(0, len(S), 2):
    if (S[i] + S[i + 1] == 'hi'):
        continue
    else:
        print('No')
        exit()
print('Yes')

Solution (Python):
S = input()
if (S == ("hi" * (len(S)//2))):
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
S = S.replace("hi", "")
if S:
    print("No")
else:
    print("Yes")

Solution (Python):
S = list(input())

if len(S)%2 != 0:
  print("No")
else:
  for i in range(len(S)):
    if (i%2 == 0 and S[i] != "h") or (i%2 == 1 and S[i] != "i"):
        print("No")
        break
  else:
   	print("Yes")

Solution (Python):
S = input()

ans = 'Yes'
buf = S
while buf:
    if len(buf) < 2 or not 'hi' in buf[-2:]:
        ans = 'No'
        break
    buf = buf[0:-2]

print(ans)

Solution (Python):
string = input()
flg = True
if len(string)  == 0:
  flg = False
if len(string) % 2 != 0:
  flg = False
for i in range(len(string)//2):
  if string[i*2:i*2+2] != 'hi':
    flg = False
    break
    
if flg:
  print('Yes')
else:
  print('No')

Solution (Python):
print("No" if input().replace("hi","") else "Yes")

Solution (Python):
S = input()
def hitachi(S):
  i = 0
  while i < len(S):
    if S[i:i+2]!='hi':
      return('No')
    i+=2
  return('Yes')

print(hitachi(S))

Solution (Python):
s = str(input())
if s == "hi" or s == "hihi" or s == "hihihi" or s == "hihihihi" or s == "hihihihihi":
    print("Yes")
else:
    print("No")

Solution (Python):
S=input()
if S=="hi" or S=="hihi" or S=="hihihi" or S=="hihihihi" or S=="hihihihihi":
  print("Yes")
else:
  print("No")

Solution (Python):
print(["No","Yes"][input() in ["hi" * x for x in range(1,6)]])

Solution (Python):
s = input()
cant = 1
for i in range(1, 6):
        if "hi"*i==s: cant = 0
print("YNeos"[cant::2])

Solution (Python):
s = input()
if s in ['hi', 'hihi', 'hihihi', 'hihihihi', 'hihihihihi']:
  print('Yes')
else:
  print('No')

Solution (Python):
S = input()
jdg = False
for i in range(1,6):
    if S == "hi"*i:
        jdg = True
if jdg:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()

cnt = S.count("hi")
if(cnt*2 == len(S)):
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
hi = True
for i in range(0, len(s),2):
    if s[i:i+2] != "hi":
        hi = False
print("Yes" if hi else "No")

Solution (Python):
S = input()
flag = True
for i in range(0,len(S),2):
  if S[i:i+2] != 'hi':
    flag = False
print(['No','Yes'][flag])

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

























def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

inf = float('inf')
mod = 1000000007




def main():
	S = input()
	S = S[:-1]
	tmp = S.split("hi")

	flg = True
	for i in tmp:
		if i != "":
			flg = False
			break

	if flg == True:
		print("Yes")
	else:
		print("No")
	

	









def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res


def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def egcd(a, b):
    if a == 0:
        return b, 0, 1
    else:
        g, y, x = egcd(b % a, a)
        return g, x - (b // a) * y, y



def H(n, r, mod=10**9+7):
	
	
    return combination(n+r-1, r, mod)

class Combination:
    """
    O(n)の前計算を1回行うことで，O(1)でnCr mod mを求められる
    n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms)
    使用例：
    comb = Combination(1000000)
    print(comb(5, 3))  
    """
    def __init__(self, n_max, mod=10**9+7):
        self.mod = mod
        self.modinv = self.make_modinv_list(n_max)
        self.fac, self.facinv = self.make_factorial_list(n_max)

    def __call__(self, n, r):
        return self.fac[n] * self.facinv[r] % self.mod * self.facinv[n-r] % self.mod

    def make_factorial_list(self, n):
        
        
        fac = [1]
        facinv = [1]
        for i in range(1, n+1):
            fac.append(fac[i-1] * i % self.mod)
            facinv.append(facinv[i-1] * self.modinv[i] % self.mod)
        return fac, facinv

    def make_modinv_list(self, n):
        
        modinv = [0] * (n+1)
        modinv[1] = 1
        for i in range(2, n+1):
            modinv[i] = self.mod - self.mod//i * modinv[self.mod%i] % self.mod
        return modinv

if __name__ == "__main__":
	main()

Solution (Python):
s = input()
li = list(s)
if (len(s)%2==0):
    for i in range(0,len(s),2):
        a = li[i] + li[i+1]
        if (a!="hi"):
            print("No")
            break
    else:
        print("Yes")
else:
    print("No")

Solution (Python):
s=input()
print('Yes' if s.count('hi')==len(s)/2 else 'No')

Solution (Python):
S = input()

if len(S) % 2 != 0:
    print('No')
else:
    a = S.count('hi')
    if a == len(S) // 2:
        print('Yes')
    else:
        print('No')

Solution (Python):
s = input()
s = s.replace('hi', "")
if len(s) == 0:
    print('Yes')
else:
    print('No')

Solution (Python):
import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_tuple(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


def read_matrix(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read()[:-1] for _ in range(H)]


def read_map_as_int(H):
    '''
    
    '''
    ret = []
    for _ in range(H):
        ret.append([1 if s == '
        
        
    return ret



from collections import defaultdict, Counter, deque
from operator import itemgetter
from itertools import product, permutations, combinations
from fractions import gcd


def lcm(a, b):
    
    g = gcd(a, b)
    return a * b // g


S = read()[:-1]
if len(S) < 2 or len(S) & 1 == 1:
    print('No')
    exit()
hi = 'hi'
for s, ss in zip(S[::2], S[1::2]):
    if hi != s + ss:
        print('No')
        exit()

print('Yes')

Solution (Python):
S = input().rstrip()
if S.replace('hi', ''):
    print('No')
else:
    print('Yes')

Solution (Python):
N=input()
if len(N)%2==0:
    for i in range(len(N)):
        if i%2==0:
            if N[i]!="h":
                print("No")
                exit()
        else:
            if N[i]!="i":
                print("No")
                exit()
else:
    print("No")
    exit()
print("Yes")

Solution (Python):
s = input()
s_len = len(s)
s_len = int(s_len / 2)
hi_str = "hi"
new_s = hi_str * s_len
if s == new_s:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input().replace('hi', '1')
if set(list(s)) == {'1'}:
    ans = 'Yes'
else:
    ans = 'No'
print(ans)

Solution (Python):
S = [s for s in input()]
h = 'hi'
if len(S)%2 != 0:
    print('No')
    exit()
flag = 1
while S:
    if len(S) >= 2:
        s1 = S.pop(0)
        s2 = S.pop(0)
        tmp = s1+s2
        if tmp == h:
            continue
        else:
            flag = 0
if flag:
    print('Yes')
else:
    print('No')

Solution (Python):
s= input()
if len(s)%2!=0:
    print('No')
else:
    no= False
    while(len(s)>0 and not no):
        if s[:2]!='hi':
            no=True
            break
        s=s[2:]
    if no:
        print('No')
    else:
        print('Yes')

Solution (Python):
def main(s):
    if len(s) % 2 == 1:
        return 'No'
    else:
        p = int(len(s)/2)
        for i in range(p):
            if s[2*i] != 'h' or s[2*i+1] != 'i':
                return 'No'
        return 'Yes'
s = input()
print(main(s))

Solution (Python):
s=input()

for i in range(len(s)):
    if i%2==0 and s[i] == 'h':
        continue
    elif i%2==1 and s[i] == 'i':
        continue
    else:
        print('No')
        exit()
if s[-1] == 'i':
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()
S = S.replace('hi', '')

if S:
    print('No')
else:
    print("Yes")

Solution (Python):
S = input()

HI = ['hi','hihi','hihihi','hihihihi','hihihihihi',]
if S in HI:
    print('Yes')
else:
    print('No')

Solution (Python):
import sys
s = input()
def hitachi(s):
  n = len(s)
  if n % 2 != 0:
    return False
  for i in range(0, n, 2):
      if s[i] != 'h' or s[i + 1] != 'i':
          return False
  return True

if hitachi(s):
  print('Yes')
else:
  print('No')

Solution (Python):
s = input()

if(len(s) % 2!=0):
    print('No')
    
else:
    for i in range(len(s) // 2):
        if(s[i*2:i*2+2] != 'hi'):
            print('No')
            break
    else:
        print('Yes')

Solution (Python):
import re;print("YNeos"[re.match(r"^(hi)+$" ,input())==None::2])

Solution (Python):
def inpl():
    return list(map(int, input().split()))


S = input()

if len(S) % 2 == 1:
    print("No")
    exit()

for i in range(0, len(S), 2):
    if S[i:i + 2] != "hi":
        print("No")
        break
else:
    print("Yes")

Solution (Python):
S = input()
hitachi = ['hi'*i for i in range(1,6)]
if S in hitachi:
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()
ans = 'Yes'
for i in range(0,len(S),2):
    if S[i:i+2] != 'hi':
        ans = 'No'
        break
print(ans)

Solution (Python):
s = input()
for i in range(1, 6):
    if s == 'hi' * i:
        print('Yes')
        exit()
print('No')

Solution (Python):
s = input()
if len(s) % 2 == 1:
    print("No")
else:
    for i in range(len(s)//2):
        if s[i*2] != 'h' or s[i*2+1] != 'i':
            print("No")
            exit()
    print("Yes")

Solution (Python):
s = input()

ans = "No"
if s == "hi":
    ans = "Yes"
elif s == "hihi":
    ans = "Yes"
elif s == "hihihi":
    ans = "Yes"
elif s == "hihihihi":
    ans = "Yes"
elif s == "hihihihihi":
    ans = "Yes"

print(ans)

Solution (Python):
import sys
s = input()

i = 0
while True:
    if s[i:i+2] != 'hi':
        print('No')
        sys.exit()
    i += 2
    if i >= len(s):
        break

print('Yes')

Solution (Python):
s=input()
if(len(s)%2==1):
    print("No")
else:
    kano=True
    for i in range(len(s)//2):
        if(s[i*2:i*2+2]!="hi"):
            kano=False
            break
    if(kano):
        print("Yes")
    else:
        print("No")

Solution (Python):
S=input()

answer="Yes"

for i in range(len(S)//2):
    if S[2*i:2*(i+1)]=="hi":
        pass
    else:
        answer="No"
        break
if len(S)%2==1:
    answer="No"

print(answer)

Solution (Python):



def solve(*args: str) -> str:
    s = args[0]

    ret = True
    for i in range(0, len(s), 2):
        ret &= s[i:i+2] == 'hi'
    return 'Yes' if ret else 'No'


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))

Solution (Python):

S = input()

flag = 0
if len(S)%2!=0:
    flag=1
else:
    for i in range(len(S)//2):
        if S[i*2:i*2+2] != "hi":
            flag = 1
            break

if flag==0:
    print("Yes")
else:
    print("No")

Solution (Python):
def resolve():
    S = input()
    for i in range(0, len(S), 2):
        if S[i:i+2] != 'hi':
            print("No")
            return

    print("Yes")
        

if __name__ == "__main__":
    resolve()

Solution (Python):
s=input()

tog=True
for i in s:
    if tog:
        if i!="h":
            print("No")
            exit(0)
    else:
        if i!="i":
            print("No")
            exit(0)
    tog=not tog

if tog:
    print("Yes")
else:
    print("No")

Solution (Python):


s = input()
for i in range(1,6):
    if s == "hi"*i:
        print("Yes")
        exit()
print("No")

Solution (Python):
import sys

def load(vtype=int):
    return vtype(input().strip())


def load_list(seplator=" ", vtype=int):
    return [vtype(v) for v in input().strip().split(seplator)]

s = load(str)    


if len(s) % 2 == 1:
    print('No')
    sys.exit(0)

n = int(len(s) / 2)

target = 'hi' * n

if target == s:
    print('Yes')
    sys.exit(0)
print('No')

Solution (Python):


def main():
    s = input()

    if s.count("hi") * 2 == len(s):
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
    main()