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):
def ishitach(str):

    length_str = len(str)

    if length_str < len('hi'):
        return 'No'
    else:
        start_index = 0
        end_index = len('hi')
        while end_index <= length_str:
            if str[start_index:end_index] == 'hi':
                pass
            else:
                return 'No'

            start_index = start_index + 2
            end_index = end_index + 2
            if length_str < end_index and str[start_index:] != '':
                return 'No'

    return 'Yes'


if __name__ == '__main__':
    print(ishitach(str(input())))

Solution (Python):
s = str(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):
import re
index = re.fullmatch(r'(hi)+', input())
if index:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
hi = [s[i:i+2] for i in range(0, len(s), 2)]

a = 0
for i in range(len(hi)):
  if hi[i] != 'hi':
    a += 1
    break
    
if a == 1:
  print('No')
else:
  print('Yes')

Solution (Python):
h = input()

result = 'Yes'

if len(h)%2 != 0:
  result ='No'
  
for a in range(0,len(h)-1,2):  
  b = h[a:a+2]
  if b != 'hi':
    result = 'No'
    break
    
print(result)

Solution (Python):
import math

text = input()

if text == "hi" or text == "hihi" or text == "hihihi" or text == "hihihihi" or text == "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):
s = input()
if s == "hi" * (len(s) // 2):
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
isEmpty = False
if 'hi' not in s:
    print("No")
    isEmpty = True
s = s.split('hi')
s = set(s)
if not isEmpty:
    if '' in s and len(s) == 1:
        print("Yes")
    else:
        print("No")

Solution (Python):
s = input()
isEmpty = False
if 'hi' not in s:
    print("No")
    isEmpty = True
s = s.split('hi')
s = set(s)
if not isEmpty:
    if '' in s and len(s) == 1:
        print("Yes")
    else:
        print("No")

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

Solution (Python):
s = str(input())
if s.startswith('hi'):
    if s.endswith('hi'):
        print('Yes')
    else:
        print('No')
else:
    print('No')

Solution (Python):

S = input()
st = []
if len(S) %2 != 0 :
    print('No')
else :
    for i in range(len(S) // 2) :
        st.append(S[i*2:i*2+2])
      
    st = list(set(st)) 
    if len(st) == 1 and st[0] == 'hi' :
        print('Yes')
    else :
        print('No')

Solution (Python):
S = input()

ss = S.split('hi')

len_sum = sum([len(x) for x in ss])

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

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

Solution (Python):
n = raw_input()

length = len(n)
if length % 2 == 0:
  if n.count('hi')==length/2:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Solution (Python):
S = input()
i = 0
count = 0
length = len(S)

if S[length - 1] == "h":
  count = 1
elif length % 2 == 1:
  count = 1
else:
  while i <= len(S)-2:
    if S[i] == "h" and S[i + 1] == "i":
      i += 2
    else:
      count = 1
      break

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

Solution (Python):

class Solution:
    def answer(self, str_in):
        n = len(str_in)
        if n == 1:
            return "No"
        if n%2 != 0:
            return "No"
        i = 1
        arr = []

        for i in range(0,len(str_in)):
            
            if str_in[i] == 'h' and str_in[i+1]== 'i':
                arr.append(i)
                
            elif str_in[i] == 'i' and str_in[i-1] == 'h':
                
                if arr == []:
                    return "No"
                else:
                    arr.pop()
            else:
                return "No"
        if arr == []:
            return "Yes"
        else:
            return "No"

str_in = input()

s = Solution()
print(s.answer(str_in))

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

Solution (Python):
s = input()
r = 'No'
ss = 'hi'
for i in range(5):
    if s == ss:
        r = 'Yes'
    ss += 'hi'
print(r)

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

Solution (Python):
import sys
S = str(input())
ans = 0
if len(S) == 1:
    print('No')
    ans = 1
    sys.exit()
if S[-1] == 'h' and ans != 1:
    print('No')
    ans = 1
    sys.exit()
if S[-1] == 'i' and S[-2] != 'h':
    print('No')
    sys.exit()
for i in range(len(S)-1):
    if S[i] != 'h' and S[i] != 'i' and ans != 1:
        print('No')
        ans = 1
        break
    if S[i] == 'i' and S[1-1] != 'h' and ans != 1:
        print('No')
        ans = 1
        break
    if S[i] == 'h' and S[i+1] != 'i' and ans != 1:
        print('No')
        ans = 1
        break
if ans == 0:
    print('Yes')

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

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

Solution (Python):
s = input()
n = len(s)

if n % 2 == 1:
    print('No')
else:
    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')

Solution (Python):
import sys
S= list(str(input()))
for i in range(len(S)-1):
    if S[i]=='h'and S[i+1]=='i'and S.count('h')==S.count('i'):
        print('Yes')
        sys.exit()
    elif S[i]=='h'and S[i+1]=='h':
        print('No')
        sys.exit()
print('No')

Solution (Python):
n=input()
ans = True
for i in range(0, len(n), 2):
    if n[i: i+2] != "hi":
        ans = False

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

Solution (Python):
s = input()
hitachi_str = ["hi","hihi","hihihi","hihihihi","hihihihihi"]

if s in hitachi_str:
    print("Yes")
else:
    print("No")

Solution (Python):
import re
s=input()
if re.fullmatch(r'(hi)+',s):
    print("Yes")
else:
    print("No")

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

Solution (Python):
s = input()

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

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

Solution (Python):
letter = input()

for kk in range(len(letter)):
    if letter.startswith('hi'):
        letter = letter[2:]
        
if not letter:
    print("Yes")
else:
    print("No")

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

Solution (Python):



def if_hi(input_):
    hi = 'hi'
    for i in range(0, len(input_), len(hi)):
        if input_[i:i+len(hi)] == hi:
            pass
        else:
            return False
    return True


def main():
    input_ = input()
    
    if len(input_) < 2:
        print('No')
    elif if_hi(input_):
        print('Yes')
    else:
        print('No')

    return 0


if __name__ == '__main__':
    main()

Solution (Python):
a=input()

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

Solution (Python):
import re

s = input()
 
result = re.fullmatch("(hi){1,5}",s)
 
if result == None:
    print("No")
else:
    print("Yes")

Solution (Python):
S = input()

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

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

Solution (Python):
x = input()
y = x.split('hi')
count = 0

for i in range(len(y)):
    if(y[i] != ''):
        count = count + 1

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

Solution (Python):
x = []
x = input()

y = 0

for i in range(len(x)):
    if x[0:2] != "hi":
        break
    if x[i] != 'h' and x[i] != 'i':
        y = 0
        break
    if len(x) % 2 != 0:
        break
    if x[i:i + 2] == "hi":
        y = 1
    else:
        pass

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

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

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

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

if s_cnt % 2 == 0:
    tmp = s_cnt / 2
    if s.count('hi') == tmp:
        print('Yes')
    else:
        print('No')
else:
    print('No')

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

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

checker = True
if 'hi' not in s:
    checker =False

while 'hi' in s:
    s = s.replace('hi','XX')

for i in range(1,len(s)-1):
    if s[i] =='X':
        if s[i-1] == 'i' or s[i-1] == 'h'or s[i+1] == 'i' or s[i+1] == 'h':
            checker = False
            break

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

Solution (Python):
string = input()
flag = False
 
num = len(string)
if num % 2 == 0:
  for i in range(num // 2):
    if string[2*i:2*(i+1)] == "hi":
      if i == num // 2 - 1:
        flag = True
    else:
      break

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

Solution (Python):
S = input()
i = 0
result = 'Yes'
while i<len(S):
  if S[i:i+2] != 'hi':
    result = 'No'
    break
  i+=2
print(result)

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

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

Solution (Python):

s = input()

for i in range(0, len(s), 2):
    if len(s)%2 == 1:
        bool = False
        break
    elif s[i] == 'h' and s[i+1] == 'i':
        bool = True
    else:
        bool = False
        break
        
print('Yes' if bool else 'No')

Solution (Python):
s = input()

text = s
find = False
if 'hi' in text:
    text = text.replace('hi', '')
    find = True

ret = "No"
if len(text) == 0 and find == True:
    ret = "Yes"
print("{}".format(ret))

Solution (Python):
s=input()
i=0;
found=False;
h=0;
k=0;
if(len(s)%2!=0):
	found=False
else:
	while(i<len(s)):
		if(s[i]=='h' or s[i]=='i'):
			if(i%2==0 and s[i]=='h'):
				found=True
			if(i%2!=0 and s[i]=='i'):
				found=True
			if(i%2!=0 and s[i]=='h'):
				found=False
			if(i%2==0 and s[i]=='i'):
				found=False
			
		else:
			found=False
			break;		
		i=i+1
if(len(s)>1):
	if(s[0]=='i'):
		found=False
	if(s[1]=='h'):
		found=False

if(found==False):
	print("No")
else:
	print("Yes")

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

Solution (Python):
n = input()
l = n.split("i")


i = int(len(l)-1)



if int(len(n)%2)==0:
    if i==0:
        print("No")
    elif i==1:
        if l[0]=="h":
            print("Yes")
        else:
            print("No")
    elif i==2:
        if l[0]==l[1]=="h":
            print("Yes")
        else:
            print("No")
    elif i==3:
        if l[0]==l[1]==l[2]=="h":
             print("Yes")
        else:
            print("No")
    else:
        if l[0]==l[1]==l[2]==l[3]=="h":
            print("Yes")
        else:
            print("No")
else:
    print("No")

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

Solution (Python):
hitachi = input()

j = 0
tmp = 0

def check_hit(a,b):
    if a == b:
        return 1
    return 0


for i in hitachi:
    if j % 2 == 0:
        tmp += int(check_hit(i,"h"))
    else:
        tmp += int(check_hit(i,"i"))
    j+=1

if tmp == len(hitachi) and j%2==0 and tmp > 0:
    print("Yes")
else:
    print("No")

Solution (Python):



import re

input = input()

pattern = '^(hi)+$'


repatter = re.compile(pattern)
result = repatter.fullmatch(input)

if result is not None:
    print("Yes")
else:
    print("No")

Solution (Python):
a = input()

if a == 'hi' or a == 'hihi' or a == 'hihihi' or a == 'hihihihi' or a == 'hihihihihi':
    print('Yes')

else:
    print('No')

Solution (Python):
n = input()

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

print(ans)

Solution (Python):
import sys
S = list(input())
if len(S)%2 != 0:
    print("No")
    sys.exit()
for i in range(len(S)):
    if i%2 == 0:
        if S[i] != 'h':
            print("No")
            sys.exit()
    else:
        if S[i] != 'i':
            print("No")
            sys.exit()
print("Yes")

Solution (Python):
s=input()
s=s.replace('hi','')
if s:
	print('No')
else:
	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()
n=len(s)
if n<=1:
  print("No")
  exit()
for i in range(n):
  if i!=n-1 and s[i]=="h":
    if s[i+1]!="i":
      print("No")
      exit()
  elif i!=0 and s[i]=="i":
    if s[i-1]!="h":
      print("No")
      exit()
  elif s[i]!="h" or s[i]!="i":
      print("No")
      exit()
print("Yes")

Solution (Python):
import sys
S = input()
if S == 'hi':
  print('Yes')
  sys.exit(0)
if S != 'hihi' and S != 'hihihi' and S != 'hihihihi' and S != 'hihihihihi':
  print('No')
  sys.exit(0)
print('Yes')

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

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

Solution (Python):
S = input()

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

if len(S) == 2 and S == "hi":
    print("Yes")
    exit()
elif len(S) == 4 and S == "hihi":
    print("Yes")
    exit()
elif len(S) == 6 and S == "hihihi":
    print("Yes")
    exit()
elif len(S) == 8 and S == "hihihihi":
    print("Yes")
    exit()
elif len(S) == 10 and S == "hihihihihi":
    print("Yes")
    exit()

print("No")

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

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

Solution (Python):
s = input()
i = s.count('h')
j = s.count('i')
h = 'hi'

if h in s:
  if ('ii' or 'hh') in s:
    print('No')
  else:
    if i == j:
        print('Yes')
    else:
        print('No')
else:
  print('No')

Solution (Python):
S = input()
N = int(len(S)/2)

[print('Yes') if S == 'hi'*N else print('No')]

Solution (Python):
str = input()

str = str.replace("hi", "")

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

Solution (Python):
str = input()
str_len = len(str)
h_flag = 0
for cat_i in range(str_len):
  if str_len % 2 == 1:
    print('No')
    break
  
  if h_flag == 0 and str[cat_i] == 'h':
    h_flag = 1
  elif h_flag == 1 and str[cat_i] == 'i':
    h_flag = 0
  else:
    print('No')
    break
    
  if cat_i == (str_len - 1):
    print('Yes')

Solution (Python):
S = input()

flag = True

if len(S) % 2 == 0:
    if S.find('hi') % 2 == 0:
        flag = True
    else:
        flag = False
else:
    flag = False


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

Solution (Python):
S = input()

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

Solution (Python):
s = input()
txt = 'No'

for i in range(5):
    if(s == 'hi' * (i + 1)):
        txt = 'Yes'
        break

print(txt)

Solution (Python):


def main():
    S = input()

    for i in range(1, 6):
        h = 'hi' * i
        if S == h:
            print('Yes')
            return
    else:
        print('No')

main()

Solution (Python):
s = input()

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

Solution (Python):
s = input()
ans = False
if len(s) < 1 or len(s) >10:
    ans = False
if len(s) >= 1 or len(s) <= 10:
    if s == 'hi' or s == 'hihi' or s == 'hihihi' or s == 'hihihihi' or s == 'hihihihihi':
        ans =True
    else:
        ans =False
if ans:
    print ('Yes')
else:
    print('No')

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

Solution (Python):
import re
a = str(input())

m1 = re.match(r"^hi$", a)
m2 = re.match(r"^hihi$", a)
m3 = re.match(r"^hihihi$", a)
m4 = re.match(r"^hihihihi$", a)
m5 = re.match(r"^hihihihihi$", a)

if m1 or m2 or m3 or m4 or m5:
    print('Yes')
else:
    print('No')

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

Solution (Python):
S = input()
hi = 'hi'
if len(S) % 2 == 0:
    T = len(S) // 2 * hi
    if S == T:
        print('Yes')
    else:
        print('No')
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()
l=len(s)
if l%2==0 and s.count("hi")==l/2:print("Yes")
else:print("No")

Solution (Python):
S=input()
if S[0]!="h":
    print("No")
    exit()
if len(S)<2:
    print("No")
    exit()
han="i"
for i in range(1,len(S)):
    if S[i]!=han:
        print("No")
        exit()
    if S[i-1]=="h":
        han="h"
    elif S[i-1]=="i":
        han="i"
if S[-1]=="h":
    print("No")
    exit()
print("Yes")

Solution (Python):
s = input()
histr = 'hi'
flag = 0
for i in range(6):
  if histr * i == s:
    flag = 1
print('Yes' if flag == 1 else 'No')

Solution (Python):


import sys
import math
import collections
import itertools
from inspect import currentframe
INF = 10 ** 10
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def gcd(x, y) : return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y) : return (x * y) // gcd(x, y)
def I() : return int(input())
def MI() : return map(int, input().split())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def chkprint(*args) : names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}; print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args))

S = input()

N = len(S)

if N % 2 == 1:
    print("No")
else:
    flag = True
    for i in range(int(N/2)):
        a = i*2
        if not(S[a:a+2] == "hi"):
            flag = False
    if flag :
        print("Yes")
    else:
        print("No")

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

Solution (Python):
h = input()
l = len(h)
n = 0
hitachi = False

if l % 2 == 1:
  hitachi = False
  
else:
  m = int(l / 2)
  for i in range(m):
    if h[(2 * i)] == "h":
      n += 1
    if h[(2 * i)+1] == "i":
      n += 1
  
  if n == l:
    hitachi = True
  else:
    hitachi = False
    
if hitachi:
  print("Yes")
else:
  print("No")

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

Solution (Python):
str_i = input()

length= len(str_i)
flag = 1

if (length%2 != 0):
    
    flag = 0
    
else:
    str_list_d = ""
    for i in range(int(length/2)):
        k = i*2
        str_list_d =  str_i[k]+str_i[k+1] 
        if(str_list_d != "hi"):
            flag = 0
            break


if (flag == 1):
    print("Yes")

else:
    print("No")

Solution (Python):
import sys
S = input()
a = []
count = 0

for i in range(0, len(S)):
    a.append(S[i])

if len(S) % 2 == 0:
    for k in range(0, len(S)):
        if k % 2 == 0:
            if S[k] == "h":
                if S[k+1] == "i":
                    count += 1
                else:
                    print("No")
                    sys.exit()
            else:
                print("No")
                sys.exit()
        else:
            pass
else:
    print("No")

if count > 0:
    print("Yes")

Solution (Python):



S = str(input())
if len(S)%2==1:
  print('No')
  exit()
n = 0
while len(S) > n:
    if n % 2 == 1 and S[n] != 'i':
        print('No')
        exit()
    elif n % 2 == 0 and S[n] != 'h':
        print('No')
        exit()
    n += 1

print('Yes')

Solution (Python):
S = input()
D = 0

if len(S)%2 != 0:
    print("No")
    D = 1
    
else:
    for i in range(len(S)//2):
        if ((S[i * 2] == "h") & (S[(i * 2) + 1] == "i")) != True:
            print("No")
            D = 1
            break
        
if D == 0:
    print("Yes")

Solution (Python):
print("NYoe s"[input()in["hi"*x for x in range(6)]::2])

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

for n in range(0, len(s) // 2 + 1, 2):
    if not s[n:n + 2] == 'hi' :
        print('No')
        exit()
print('Yes')

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

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

Solution (Python):
S = input()


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

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

Solution (Python):
s=input()
ans="No"
if len(s)==2 and s=="hi":
  ans="Yes"
if len(s)==4 and s=="hihi":
  ans="Yes"
if len(s)==6 and s=="hihihi":
  ans="Yes"
if len(s)==8 and s=="hihihihi":
  ans="Yes"
if len(s)==10 and s=="hihihihihi":
  ans="Yes"
print(ans)

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

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

Solution (Python):
a = input()

n = a.count('hi')
b = a.count('hii')

if(len(a)/2==n):
	print("Yes\n")
else:
	print("No\n")

Solution (Python):
input = input()

if len(input) % 2:
    print("No")
    exit(0)

result = "Yes"
isHi = False
for i in range(len(input)-1):
    if isHi:
        isHi = False
        continue;

    str = input[i] + input[i+1]
    if str != "hi":
        result = "No"
        break

    isHi = True

print(result)

Solution (Python):
import sys

S = input()

flag = 0

for s in S:
    if s == "h":
        flag = flag + 1
        if flag >= 2:
            print("No")
            sys.exit()
    elif s == 'i':
        flag = flag - 1
        if flag < 0:
            print("No")
            sys.exit()
    else:
        print("No")
        sys.exit()

if s == "h":
    print("No")
    sys.exit()    

print("Yes")

Solution (Python):
S=list(input())
tmp=""
ans="No"
for s in S:
    if(tmp==""):
        tmp=s
        ans="No"
    else:
        if(s=='i' and tmp=='h'):
            ans="Yes"
            tmp=''
        else:
            ans="No"
            break
print(ans)

Solution (Python):
S = input()
pattern = 'hi'
cnt = len(S)//2
for _ in range(cnt-1):
    pattern += 'hi'

if S == pattern:
    print('Yes')
else:
    print('No')

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

Solution (Python):
str = input()

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

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

Solution (Python):
S = input()

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

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

Solution (Python):
import re;print(re.match('(hi)+$',input())and'Yes'or'No')

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

Solution (Python):
S = input()

if S == 'hi' or S == 'hihi' or S == 'hihihi' or S == 'hihihihi' or S == 'hihihihihi':
  print('Yes')
else:
  print('No')
"""
if len(S) == 1:
  print('No')
elif len(S) == 2:
  if S == 'hi':
    print('Yes')
  else:
    print('No')
else:
  flag = 0
  i = 0
  while i < len(S)-1:
    if S[i:i+2] == 'hi':
      flag = 1
    else:
      flag = 0
      break
    i += 2
  if flag == 1:
    print('Yes')
  else:
    print('No')
"""

Solution (Python):
a = input()
l = list(a)
num = len(l)
TorF = True

if num % 2 == 0:
    b = int(num/2)
    for i in range(b):
        if not (a[2*i] == 'h' and a[2*i + 1] == 'i'):
            TorF = False
            break
else:
    TorF = False

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

Solution (Python):
import re

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

Solution (Python):

input_line = input()
Line = list(input_line)

flag = 0

for i in Line:
    

    if i == "h" and flag == 0:
        flag = 1
    elif i == "i" and flag ==1:
        flag = 0
    else:
        flag = 2

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

Solution (Python):
s = input()

if len(s) % 2 == 0:
    if len(s) / 2 == s.count("hi"):
        print("Yes")
        exit()
print("No")

Solution (Python):
s = str(input())
if len(s) % 2 == 1:
    print("No")
    exit()
j = 0
while j < len(s) - 1:
        
        if s[j:j + 2] == "hi":
            
            j += 2
        else:
            print("No")
            exit()

print("Yes")

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

Solution (Python):
s = input()

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

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

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

Solution (Python):
S = input()
lens = len(S)

if S == '':
    print('No')
    exit()

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

print('Yes')

Solution (Python):
s=input()
list=[]
for i in range(1,100):
    list.append("hi"*i)
if s in list:
    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="No"
flg=0
flg1=0

if len(S) == 1:
  ans="No"
elif len(S) < 11:
  flg1=1
  for i in range(len(S)):
    if flg==0:
      if S[i] == 'h':
        flg=1
      else:
        flg=2
        break
    elif flg==1:
      if S[i] == 'i':
        flg=0
      else:
        flg=2
        break
else:
  ans="No"
        
if flg==0 and flg1 == 1:
  ans="Yes"
          
print(ans)

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()
s_len = len(s)
if s_len % 2:
  print("No")
else:
  prev = 0
  count = 0
  for i in range(1, (s_len//2)+1):
    if s[prev*2:i*2] != "hi":
      print("No")
      break
    else:
      count += 1
      prev = i
  if count == s_len // 2:
    print("Yes")

Solution (Python):
s = input()
s1 = 'hi'
for i in range(5):
    if s == s1:
        print('Yes')
        exit()
    else:
        s1 += 'hi'
print('No')

Solution (Python):
str = input().split('i')
flag = True

for s in str[0:-1]:
  if(flag):
    if(s != 'h'):
      print('No')
      flag = False

if(flag):
  if(str[len(str)-1] != ''):
    print('No')
    flag = False
if(flag):
  print('Yes')

Solution (Python):
s = input()
i = int(len(s) / 2)
if "hi" * i == s:
    print("Yes")

else:
    print("No")

Solution (Python):
import re

s = input()
if len(s) % 2 == 1:
  s += "a"
li = re.split('(..)',s)[1::2]
check = "hi"
ans = 0
for i in li:
  if check not in i:
    ans += 1
if ans == 0:
  print("Yes")
else:
  print("No")