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()
a = ""
ans = "No"
for i in range(5):
  a += "hi"
  if a == s:
    ans = "Yes"
    break
    
print(ans)

Solution (Python):
S = input()

ans = ["hi","hi" * 2, "hi"*3,"hi"*4,"hi" * 5]

if S in ans:
    print("Yes")
else:
    print("No")

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

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

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

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

Solution (Python):
a  = input()
import re
k = re.split('(..)',a)[1::2]
result = 'Yes'
for i in range(len(k)):
  if k[i] != 'hi':
    result = 'No'

if len(a) % 2 == 1:
  print('No')
else:
  print(result)

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

if len(S) % 2 == 0:
  for i in range(0, len(S), 2):
    if S[i] == 'h' and S[i + 1] == 'i':
      pass
    else:
      flag = not flag
      break
else:
  flag = not flag

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

Solution (Python):
s = input()
print('YNeos'[s != len(s) // 2 * 'hi'::2])

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

Solution (Python):
S = input()

l = S.split("hi")
if "".join(l):
    print("No")
else:
    print("Yes")

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

Solution (Python):
import sys

s  = str(input())

leng = len(s)

s1 = s.split('hi')

s2 = s1.count('')


counter = int(s2) - 1

what = int(leng / 2)

hi = "hi"

if counter == what:
  print("Yes")
else:
    print("No")

Solution (Python):
S=input()
length=int(len(S))


if length<=1:
    print("No")
elif length%2!=0 :
    print("No")
else:
    for i in range(length//2):
        if S[2*i]=="h" and S[2*i+1]=="i":
            temp=0
        else:
            print("No")
            temp=1
            break
            
    if temp==0:
        print("Yes")
    else:
        nothing=0

Solution (Python):
S = input()

def getHi(S):
    if len(S) % 2 == 1:
        return "No"
    for i in range(len(S)-1):
        if i % 2 == 0:
            if S[i] + S[i+1] != "hi":
                return"No"
        else:
            if S[i] + S[i+1] != "ih":
                return"No"
    return "Yes"

print(getHi(S))

Solution (Python):

import sys,re

def inn(func=int):
    return list(map(func,input().split()))

def ins():
    return input().split()

s = input()
ss = re.sub("(hi)+","",s)
if ss == "":
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
if len(s)%2!=0:
    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()
if(len(s)<=1):
    print('No')
    exit()

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

Solution (Python):
s=input()

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):
n = input()

if(len(n)%2==1):
  print ("No")
  exit()
i=0
while (i<len(n)):
  if i % 2 == 0:
    if n[i] != 'h':
      print('No')
      exit()
  else:
    if n[i] != 'i':
      print('No')
      exit()
  i = i+1
print('Yes')

Solution (Python):
S = input().strip()

if len(S) % 2 != 0:
    print("No")
else:
    hitach = "Yes"
    while len(S) > 0:
        s = S[0:2]
        S = S[2:]
        if s != "hi":
            hitach = "No"
            break
    print(hitach)

Solution (Python):
def main():
    S = input()
    ans = "Yes"
    if len(S) % 2 == 1:
        ans = "No"
    elif len(S) % 2 == 0:
        i = 0
        j = 2
        while j <= len(S):
            if S[i:j] == "hi":
                pass
            elif S[i:j] != "hi":
                ans = "No"
            i += 2
            j += 2
    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):

import sys
import re

YES = "Yes"  
NO = "No"  


def solve(S: str):
    if len(S)%2!=0:
        print("No")
        exit()
    l=S[::2];count=0;p=S[1::2]
    
    for i in range(len(l)):
        if l[i]=="h":
            count+=1
        if p[i]=="i":
            count+=1
    if count==len(S):
        print(YES)
    else:
        print(NO)
    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):
import sys

S = input()

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

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

Solution (Python):
S = input()
for i in range(-(-len(S) // 2)):
  if S[2*i:2*i+2] == 'hi':
    out = 'Yes'
  else:
    out = 'No'
print(out)

Solution (Python):
import sys


def main():
    s=input()
    cnt=len(s)//2
    chk='hi'*cnt
    if s==chk and s!='':
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

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

Solution (Python):
S = input()

S_replaced = S.replace('hi', '')

if len(S_replaced) > 0:
    print('No')
else:
    print('Yes')

Solution (Python):
S = input()
a = len(S)
b = S.count("hi")
b = b * 2
if a == b:
     print("Yes")
else:
     print("No")

Solution (Python):
def resolve():
    S = input()

    S_list = list(S)

    if len(S_list) % 2 == 0:
        s_len = int(len(S_list) / 2)
        if S == s_len * 'hi':
            print('Yes')
            return

    print('No')
    return

if __name__ == "__main__":
    resolve()

Solution (Python):
S = input()

res = []
if len(S) % 2 == 1:
    print('No')
else:
    for i in range(len(S)//2):
        if i % 2 == 0:
            res.append(S[2*i:2*(i+1)])
    ans = set(res)
    
    if ans == {'hi'}:
        print('Yes')
    else:
        print('No')

Solution (Python):
S = str(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):
import sys
input=sys.stdin.readline
s=input().rstrip()
if s=='hi' or s=='hihi' or s=='hihihi' or s=='hihihihi' or s=='hihihihihi':
    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 = input()
if len(S) % 2 == 1:
  print("No")
else:
  ans = "Yes"
  for i in range(0, len(S), 2):
    if S[i] != "h" or S[i+1] != "i":
      ans = "No"
  print(ans)

Solution (Python):
def main():
    flag = True
    S = input()
    if len(S) < 2 or S[-1] != 'i': flag = False
    if flag:
        for enum, i in enumerate(S):
            if enum % 2 == 0:
                if i != 'h':
                    flag = False
                    break
            else:
                if i != 'i':
                    flag = False
                    break
    if flag:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

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

Solution (Python):
S = input()

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

ans = True
for i, s in enumerate(S):
    if (i % 2 == 0) and (s != 'h'):
        ans = False
        break
    if (i % 2 != 0) and (s != 'i'):
        ans = False
        break

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

Solution (Python):
S = input()
if sum(list(map(len, S.split("hi")))) == 0:
    ans = 'Yes'
else :
    ans = 'No'
print(ans)

Solution (Python):
s=input()
cnt=0
ans="No"
flag=True

while cnt<len(s):
  if len(s)==1 or len(s)%2==1:
    flag=False
    break
  if s[cnt]=="h" and s[cnt+1]=="i":
    cnt+=2
    continue
  else:
    flag=False
    break
if flag:
  ans="Yes"
print(ans)

Solution (Python):
s = input()
if len(s) % 2 == 1:
    print("No")

else:
    i = 0
    flag = False
    while i+1 < len(s):
        if s[i:i+2] != "hi":
            flag = True
            break
        i += 2
    
    if flag:
        print("No")
    else:
        print("Yes")

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

Solution (Python):
S = input()

ans = "No"
for i in range(1,6):
    if S == "hi"*i:
        ans="Yes"
print(ans)

Solution (Python):
S = input()

A = S.count('hi')
B = len(S)

if 2*A == B:
    print('Yes')
else: 
    print('No')

Solution (Python):
S = str(input())
if "hi" in S and S.replace('hi', '') == "":
  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):
s=input()
for i in range(5):
    if s=='hi'*(i+1):
        print('Yes')
        break
else:
    print('No')

Solution (Python):
import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = str(sys.stdin.readline().rstrip())
    T = [N[i: i + 2] for i in range(0, len(N), 2)]

    for t in T:
        if t != 'hi':
            print('No')
            exit()

    print('Yes')


if __name__ == '__main__':
    main()

Solution (Python):

d = {"h":0, "i":0}
S = input()
if len(S) % 2 == 1:
    print("No")
    exit()
flag = True
for i in range(0, len(S)-1, 2):
    if S[i:i+2] != "hi":
        flag = False
        break
print("Yes" if flag else "No")

Solution (Python):


s = input()
def solve():
    if len(s) % 2 != 0:
        print("No")
        return

    for i, x in enumerate(s):
        if i % 2 == 0 and not x == "h":
            print("No")
            return
        if i % 2 == 1 and not x == "i":
            print("No")
            return

    print("Yes")

solve()

Solution (Python):
import math
import itertools
import statistics


s = input()

if len(s)%2==1:
    print("No")
else:
    for i in range(len(s)):
        if i%2==0:
            if s[i]=="h" and s[i+1]=="i":
                
                
                flag = True
            else:
                print("No")
                exit()

    print("Yes")

"""
if len(s)%2==1:
    print("NO")
else:
    for i in range(0, len(s), 2):
        if i%2==0:
            if s[i]=="h" and s[i+i]=="i":
                flag = True
            else:
                print(s[i])
                print(s[i+1])
                print("No")
                exit()
    print("Yes")
"""

Solution (Python):
s = input()

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()

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

Solution (Python):
import re

s = input()

m = re.match(r'^(hi)*$', s)
if m is not None and m.group(0):
  print("Yes")
else:
  print("No")

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

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

for i in range(len(s)-1):
    if s[i] == "h" and s[i+1] == "i":
        count += 1
if count == len(s) // 2:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
hantei = True

for i in range(0,len(S)-1,2):
  if S[i]+S[i+1] != 'hi':
    hantei = False
if len(S) % 2 == 1:
  hantei = False
    
if hantei == True:
  print('Yes')
else:
  print('No')

Solution (Python):
import sys
sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
def resolve():
    S = sr()
    if len(S)%2 == 1:
        print('No')
        return
    for i in range(len(S)):
        if (i%2 == 0 and S[i] == 'h') or (i%2 == 1 and S[i] == 'i'):
            continue
        print('No')
        return
    print('Yes')
resolve()

Solution (Python):

s = input()
l = len(s)

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

Solution (Python):
s = list(input())
ans = 0
cnt = 0
if len(s) % 2 != 0:
    print("No")
else:
    for i in range(int(len(s)/2)):
        if s[2*i] == "h" and s[2*i+1] == "i":
            cnt += 1
        
    if cnt == int(len(s)/2):
        print("Yes")
    else:
        print("No")

Solution (Python):
N=input()
b=len(N)
c=N.count("h")
d=N.count("i")
e="hi"
f="hihi"
g="hihihi"
h="hihihihi"
i="hihihihihi"
if N==e or N==f or N==g or N==h or N==i:
    print("Yes")
else:
    print("No")

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

Solution (Python):



s = input()
if len(s) == 0:
    print('No')
    exit()


for i, letter in enumerate(s):
    if i % 2 == 0:
        if letter != 'h':
            print('No')
            exit()
    elif i % 2 != 0:
        if letter != 'i':
            print('No')
            exit()

if len(s) % 2 == 0:
    print('Yes')
else:
    print('No')

Solution (Python):
S=input()
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()

s = s.replace('hi','')

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

Solution (Python):









s = input()

ans = "Yes"
if len(s) % 2 != 0:
    print("No")
    exit()

for i in range(0, len(s) - 1, 2):
    str = s[i] + s[i + 1]
    if str == 'hi':
        continue
    ans = "No"

print(ans)

Solution (Python):


def solve():
    S = input()
    hi = "hi"
    s = S.split(hi)
    for x in s:
        if x == "":
            continue
        else:
            print("No")
            return
    print("Yes")


if __name__ == "__main__":
    solve()

Solution (Python):
a=input()
if 'hi'*5==a:
    print('Yes')
elif 'hi'*4==a:
    print('Yes')
elif 'hi'*3==a:
    print('Yes')
elif 'hi'*2==a:
    print('Yes')
elif 'hi' == a:
    print('Yes')
else:
    print('No')

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

if len(S)%2 == 0:
  tes = "hi"*int((len(S)/2))
  if S ==tes:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Solution (Python):
S = input()
b = True

if len(S)%2!=0:
	b = False

for i in range(1, len(S), 2):
	if S[i-1] == 'h':
		if S[i] == 'i':
			continue
	b = False

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

Solution (Python):
S=input()
L0=len(S)
C=0
if L0 % 2 == 0:
    for i in range(int(L0 / 2)):
        if (S[i*2:i*2+2] == "hi"):
            C=1
if C==1:
    print("Yes")
else:
    print("No")

Solution (Python):
s=list(input())
hcheck=0
hicheck=0
for t in s:
    if t=='h':
        hicheck=0
        hcheck=1
    elif t=='i' and hcheck==1:
        hicheck=1
        hcheck=0
    else:
        hicheck=0
        hcheck=0
        break

if hicheck==1:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
ans = "No"
if len(S) % 2 == 0:
    if S == ("hi" * (len(S) // 2)):
        ans = "Yes"


print(ans)

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

Solution (Python):
s = input()
ans = 'No'
t = ''

for i in range(5):
  t = t + 'hi'
  if s == t:
    ans = 'Yes'

print(ans)

Solution (Python):
s = input()

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

Solution (Python):
S = input()

for i in range(6):
    if S == 'hi'*i:
        print('Yes')
        exit()
print('No')

Solution (Python):
s = input()
a = 0
if len(s) % 2 == 1:
    print('No')
    exit(0)
for i in range(len(s)):
    if i % 2 == 0:
        if s[i] == 'h':
            pass
        else:
            a += 1
    else:
        if s[i] == 'i':
            pass
        else:
            a += 1

if a == 0:
    print('Yes')
else:
    print('No')

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

if len(S)%2!=0:
    print("No")
    sys.exit()

for i in range(len(S)):
    if i%2 == 0 and S[i] == "h":
        pass
    elif i%2 == 1 and S[i] == "i":
        pass
    else:
        print("No")
        sys.exit()
print("Yes")

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

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

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  

def solve(S: str):
    length = len(S)
    if length % 2 != 0:
        print(NO)
        return
    
    for i in range(length):
        if i % 2 == 0 and S[i] != "h":
            print(NO)
            return
        elif i % 2 != 0 and S[i] != "i":
            print(NO)
            return

    print(YES)

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()
flg = False

num = len(S)
if num == 2 and S == 'hi':
    flg = True
if num == 4 and S == 'hihi':
    flg = True
if num == 6 and S == 'hihihi':
    flg = True
if num == 8 and S == 'hihihihi':
    flg = True
if num == 10 and S == 'hihihihihi':
    flg = True

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

Solution (Python):


if __name__ == '__main__':
    s = input()
    flag = 1
    while (len(s) > 0):
        if (s[:2] == "hi"):
            s = s[2:]
        else:
            flag = 0
            s = ""
    if (flag):
        print("Yes")
    else:
        print("No")

Solution (Python):
s = input()

ans = True

while len(s) > 0:
    if len(s) == 1:
        print('No')
        exit(0)
    if s[0] == 'h' and s[1] == 'i':
        s = s[2:]
    else:
        ans = False
        break

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

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

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

for i in range(0,len(s),2):
    if s[i:i+2] == "hi":
        pass
    else:
        print("No")
        sys.exit()
print("Yes")

Solution (Python):



S=input()


ans='No'
if len(S)%2==0:
    
    for ii in range(int(len(S)/2)):
        if S[2*ii]=='h' and S[2*ii+1]=='i':
            ans='Yes'
        else:
            ans='No'
            break

    
print(ans)

Solution (Python):
s = input()
for i in range(0, len(s), 2):
    if s[i:i+2] == 'hi':
        continue
    else:
        print('No')
        exit()
print('Yes')

Solution (Python):
S = input()
hitachi = 'hi'
i = 1
 
while True:
    corect = hitachi * i
    if S == corect:
        print('Yes')
        break
    i += 1
    if i == 20:
        print('No')
        break

Solution (Python):
import sys
import math
import collections
from collections import deque


s = input()


if len(s) % 2 != 0:
    print("No")
    sys.exit()


for i in range(int(len(s)/2)):
    if s[2 * i] == "h" and s[2 * i + 1] == "i":
        continue
    else:
        print("No")
        sys.exit()

print("Yes")

Solution (Python):
s = input()
k = ""
for i in range(len(s)//2):
  k += "hi"
if s == k:
  print("Yes")
else:
  print("No")

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

Solution (Python):
import re

def resolve():
    str = input()
    if re.match('^(hi)+$', str):
        print("Yes")
    else:
        print("No")
        
resolve()

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

Solution (Python):
s = input()
if s == "hi":
    print("Yes")
    exit()
s = s.split("hi")
for i in s:
    if i != "":
        print("No")
        exit()
print("Yes")

Solution (Python):
S = input()
n = len(S)
s = "hi" * (n // 2)

if n % 2 == 0 and s == S:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
n = len(s)
pr =s[0]
ls = ["h","i"]
cnt = 0
for i in range(n):
    pr = s[i]
    if pr == ls[cnt]:
        pass
        cnt = (cnt+1)%2
    else:
        print("No")
        exit()
if pr == "i":
    print("Yes")
else:
    print("No")

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


def solve(S: str):
    if len(S) % 2 == 1:
        print(NO)
        exit()
    n = 0
    while n != len(S):
        if S[n] == "h" and S[n+1] == "i":
            n += 2
        else:
            break
    if n == len(S):
        print(YES)
    else:
        print(NO)



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()
if len(s)%2!=0:
  print('No')
  exit()
else:
  if s=='hi':
    print('Yes')
    exit()
  if s=='hihi':
    print('Yes')
    exit()
  if s=='hihihi':
    print('Yes')
    exit()
  if s=='hihihihi':
    print('Yes')
    exit()
  if s=='hihihihihi':
    print('Yes')
    exit()
  else:
    print('No')

Solution (Python):
s = input().rstrip()

for i in range(1, 6):
    if s == "hi" * i:
        print("Yes")
        exit()
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):
S = str(input())

flag = False
if len(S) % 2 == 1:
    flag = False
else:
    for count in range(int(len(S)/2)):
        if S[count*2] != "h" or S[count*2 + 1] != "i":
            flag = False
            break
        else:
            flag = True

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

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

Solution (Python):
import sys
 
s = input()
if len(s) % 2 != 0:
  print('No')
  sys.exit()
 
for i in range(0,len(s),2):
  if s[i:(i+2)] != 'hi':
    print('No')
    sys.exit()
    
print('Yes')

Solution (Python):
import sys

s = input()
if(len(s) % 2 == 1):
  print("No")
  sys.exit()
  

n = 0
for i in range(int(len(s)/2)):
  if(s[n] != "h" or s[n + 1] != "i"):
    print("No")
    sys.exit()
print("Yes")

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

Solution (Python):
S=input()
n=len(S)
if n==2:
  if S=='hi':
    print('Yes')
  else:
    print('No')
elif n==4:
  if S=='hihi':
    print('Yes')
  else:
    print('No')
elif n==6:
  if S=='hihihi':
    print('Yes')
  else:
    print('No')
elif n==8:
  if S=='hihihihi':
    print('Yes')
  else:
    print('No')
elif n==10:
  if S=='hihihihihi':
    print('Yes')
  else:
    print('No')
else:
  print('No')

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

Solution (Python):
s=list(input())
k=0
m=len(s)
for i in range(m//2):
  if s[2*i]+s[2*i+1]!="hi":
    k+=1
    break
if k==0 and m%2==0:
  print("Yes")
else:
  print("No")

Solution (Python):
S = list(input())
flag = True
if(len(S)%2 == 0):
    flag = True
else:
    flag = False
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(flag == True):
    print("Yes")
else:
    print("No")

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


def solve(S: str):

    if (len(S)%2 != 0):
        print(NO)
    
    else:
        for x in range(len(S)//2):
            if S[2*x:2*x+2] != "hi":
                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()
ans = 'No'
 
if len(S)%2 == 0:
    for i in range(len(S)//2):
        if S[2*i] + S[2*i+1] != 'hi':
            break
        elif i == (len(S)//2)-1:
            ans = 'Yes'
print(ans)

Solution (Python):

"""
Created on Sun Mar  8 20:59:57 2020

@author: naoki
"""
import sys
string = str(input())

if ("hhii") in string:
    print("No")
    sys.exit()

while "hi" in string:
    place = string.index("hi")
    string = list(string)
    del string[place]
    del string[place]
    string = ''.join(str(n) for n in string)

if len(string) == 0:
    print("Yes")
else:
    print("No")

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

Solution (Python):
s = input()

hi = True
for i in range(len(s)):
  if i % 2 == 0 and s[i] != "h":
    hi = False
    break
  elif i % 2 == 1 and s[i] != "i":
    hi = False
    break
    
if len(s) % 2 != 0:
  hi = False
  
if hi:
  print("Yes")
else:
  print("No")

Solution (Python):
def main():
  S = str(input())
  
  Hi_S = []
  ex = ''
  for i in range(5):
    ex += 'hi'
    Hi_S.append(ex)

  for i in Hi_S:
    if S == i:
      print('Yes')
      exit()
    else:
      pass

  print('No')

if __name__ == "__main__":
  main()

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

Solution (Python):
s = list(input())
flag = 0

if len(s)%2 == 1:
    flag = 1
for i in range(len(s)//2):
    if s[2*i] == 'h' and s[2*i+1] == 'i':
        continue
    else:
        flag = 1

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

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

Solution (Python):
import sys
readline = sys.stdin.buffer.readline

S = input()
ans = 'No'
for i in range(1, 8):
    if S == 'hi'*i:
        ans = 'Yes'

print(ans)

Solution (Python):
import re
s = input()
isHitachi = re.search("^(hi)+$", s)
if isHitachi:
  print("Yes")
else:
  print("No")

Solution (Python):
import sys

S=input()
if len(S)%2==1:
    print("No")
    exit()
ans=[]
count =0 
for i in range(len(S)):
    ans.append(S[i])

while len(ans)>1:
    if ans[0]+ans[1]=="hi":
        ans.pop(0)
        ans.pop(0)
    else:
        print("No")
        exit()
    
print("Yes")

Solution (Python):

s = input()



if s == "hi":
    print("Yes")
    exit()
s = s.split("hi")
for i in s:
    if i != "":
        print("No")
        exit()
print("Yes")

Solution (Python):
S = input()

leng = len(S) // 2
ans = 'hi' * leng

print('Yes' if S == ans else 'No')

Solution (Python):
value = input()
count = len(value)
hitachi = ['hi', 'hihi', 'hihihi', 'hihihihi', 'hihihihihi']

if count % 2 != 0:
  print('No')
else:
  if value in hitachi:
    print('Yes')
  else:
    print('No')

Solution (Python):

S=list(input())
flg=True

for i in range(len(S)):
    if i%2==0:
        if S[i]!="h":
            flg=False
    else:
        if S[i]!="i":
            flg=False
if len(S)%2==1:
    flg=False

if flg:
    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):
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float("inf")


def main():
    S = input()[:-1]
    tmp = "hi"
    for _ in range(len(S)):
        if S == tmp:
            print("Yes")
            return
        tmp += "hi"
        if len(tmp) > len(S):
            break
    print("No")


if __name__ == '__main__':
    main()

Solution (Python):
s = input()
if s == "hi" or s == "hi"*2 or s == "hi"*3 or s == "hi"*4 or s == "hi"*5:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
if len(s) % 2 != 0:
    print("No")
    exit()
else:
    S = [s[i] + s[i+1] for i in range(0, len(s), 2)]
    sS = list(set(S))
    if len(sS) == 1 and sS[0] == "hi":
        print("Yes")
    else:
        print("No")

Solution (Python):
S=str(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')
            exit()
        
        
    print('Yes')

Solution (Python):























S = input()
c = S.count("hi")
if c == len(S)/2:
    print('Yes')
else:
    print('No')

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=str(input())
k=len(S)
ans="Yes"
if k%2==0:
    for i in range(k//2):
        t=S[2*i:2*i+2:1]
        if t=="hi":
            continue
        else:
            ans="No"
            break
else:
    ans="No"
print(ans)