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



Sample input:
hihi


Sample output:
Yes

Submission status: Wrong Answer

Solution code:
s=input()
for i in range(6):
    if s=="hi"*i:
        print("Yes")
print("No")

Submission status: Wrong Answer

Solution code:
S = input()
last = 'i'

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

for c in S:
    if (last == 'i' and c != 'h') or (last == 'h' and c != 'i'):
        print("No")
        exit()
    last = c
print("Yes")
exit()

Submission status: Wrong Answer

Solution code:
s = input()
ans = 'Yes'
if len(s) == 1:
  ans = 'No'
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
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
ans = 'Yes'
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
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()

for i in range(len(s)-1):
  if (s[i]== "h" and s[i+1] == "i"):
    if i+1 == len(s)-1:
      print("Yes")
      exit()
    elif s[i+2] != "i":
      print("Yes")
      exit()

print("No")

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
def main():
    s=input()
    ans='No'
    for i in range(5):
        if s=='hi'*i:
            ans='Yes'
            break
    print(ans)



if __name__=='__main__':
    main()

Submission status: Wrong Answer

Solution code:
s = input()
if "hi" in s:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def main():
    s=input()
    l=len(s)
    if l==1:
        print('No')
        exit()
        
    ans='Yes'
    for i in range(l):
        if i%2==0:
            if s[i]=='h':
                continue
            else:
                ans='No'
                break
        else:
            if s[i]=='i':
                continue
            else:
                ans='No'
                break
    print(ans)   


if __name__=='__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    s=input()
    l=len(s)
    ans='Yes'
    for i in range(l):
        if i%2==0:
            if s[i]=='h':
                continue
            else:
                ans='No'
                break
        else:
            if s[i]=='i':
                continue
            else:
                ans='No'
                break
    print(ans)   


if __name__=='__main__':
    main()

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3

input = input()
if 'hi' in input:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input(str())
if 'hi' in S:
  print('Yes')
else :
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
str = input()

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

Submission status: Wrong Answer

Solution code:
A=input()
if A=='hi' or A=='hihi' or A=='hihihi' or A=='hihihihi' or A=='hihihihihi' or A=='hih' or A=='hihih' or A=='hihihih' or A=='hihihihih' or A=='h' or A=='i' or A=='ih' or A=='ihi' or A=='ihih' or A=='ihihi' or A=='ihihih' or A=='ihihihi' or A=='ihihihih' or A=='ihihihihi' or A=='ihihihihih':
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import re
if re.match ("^(hi)+", input()):
    print ("Yes")
else:
    print ("No")

Submission status: Wrong Answer

Solution code:
S = input()
if 'hi' in S:
  print('Yes')
else :
  print('No')

Submission status: Wrong Answer

Solution code:
import re
if re.match ("(hi)+", input()):
    print ("Yes")
else:
    print ("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
 
j_S = 'hi'
j_b = ['a','i','o','u','e']
#j_b2 =  ['a','o','u','e']

if len(S) > 1 and len(S) < 11:
    if not j_S in S:
        print('No')    
    else:
        i = 0
        S_1 = S.replace(j_S,'X')
        for in_b in j_b:
            j_S_b = 'X' + in_b
            if j_S_b in S:
                S_1 = S_1.replace(j_S_b, 'Y')
        
        
        
        if 'X' in S_1:
            if not S_1.startswith('X'):
                print('No')
            else:
                if S_1.startswith('X' + ' '):
                    print('No')
                else:
                    print('Yes')
        else:
            print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()
 
j_S = 'hi'
j_b = ['a','i','o','u','e']
#j_b2 =  ['a','o','u','e']

if len(S) > 1 | len(S) < 11:
    if not j_S in S:
        print('No')    
    else:
        i = 0
        S_1 = S.replace(j_S,'X')
        for in_b in j_b:
            j_S_b = 'X' + in_b
            if j_S_b in S:
                S_1 = S_1.replace(j_S_b, 'Y')
        
        
        
        if 'X' in S_1:
            if not S_1.startswith('X'):
                print('No')
            else:
                if S_1.startswith('X' + ' '):
                    print('No')
                else:
                    print('Yes')
        else:
            print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
f=0
s=list(input())
if len(s)==1:
    print('NO')
    f=1
else:
    for i in range(len(s)):
        if i%2==1:
            if s[i]!='i':
                f=1
                print('No')
                break
        else:
            if s[i]!='h':
                f=1
                print('No')
                break
if f==0:
    print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
f=0
s=list(input())
if len(s)==1:
    print('NO')
    f=0
else:
    for i in range(len(s)):
        if i%2==1:
            if s[i]!='i':
                f=1
                print('No')
                break
        else:
            if s[i]!='h':
                f=1
                print('No')
                break
if f==0:
    print('Yes')

Submission status: Wrong Answer

Solution code:
# coding:utf8
S = input()

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

Submission status: Wrong Answer

Solution code:
import re
if re.match ('(hi+)', input()):
    print ('Yes')
else:
    print ('No')

Submission status: Wrong Answer

Solution code:
s = input()                             # s = hiihiha

if 'hi' in s:
    if s.count('hi') > s.count('hii'):  # hi = 2 > hii = 1
        print('Yes')
    else:
        print('No')                     # if hi = 2 and hii = 2 is s = hiihii
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import re
if re.match ("(hi*)", input()):
    print ("Yes")
else:
    print ("No")

Submission status: Wrong Answer

Solution code:
S = input()
 
j_S = 'hi'
j_b = ['a','i','o','u','e']
#j_b2 =  ['a','o','u','e']

if len(S) > 1:
    if not j_S in S:
        print('No')    
    else:
        i = 0
        S_1 = S.replace(j_S,'X')
        for in_b in j_b:
            j_S_b = 'X' + in_b
            if j_S_b in S:
                S_1 = S_1.replace(j_S_b, 'Y')
        
        
        
        if 'X' in S_1:
            if not S_1.startswith('X'):
                print('No')
            else:
                if S_1.startswith('X' + ' '):
                    print('No')
                else:
                    print('Yes')
        else:
            print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import re
if re.match ("(hi+)", input()):
    print ("Yes")
else:
    print ("No")

Submission status: Wrong Answer

Solution code:
s = input()

if 'hii' in s:
    print('No')
elif 'hi' in s:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
S = input().strip()
s = str.lower(S)
target = 'hi'
index = s.find(target)
if 10 >index > -1:
    print('Yes')
else:
    print('No')
index = -1

Submission status: Wrong Answer

Solution code:
n=input()
a=n.count("h")
b=n.count("i")
if a>0 and b>0 :
  print("Yes")
else :
  print("No")

Submission status: Wrong Answer

Solution code:
try:
  s = input()
  s = s.replace(' ', '')
  s = s.replace('hii', 'xxx')
  #print(s)

  if "hi" in s:
    print("Yes")
  else: print("No")
    
except:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
try:
  s = input()
  s = s.replace(' ', '')
  s = s.replace('hii', 'xxx')
  print(s)

  if "hi" in s:
    print("Yes")
  else: print("No")
    
except:
  print("No")

Submission status: Wrong Answer

Solution code:
text = input()
answer = "No"
#print(text)
if "hi" in text:
    if "ii" in text:
        answer = "No"
    elif "hh" in text:
        answer = "No"
    else:
        answer = "Yes"

print(answer)

Submission status: Wrong Answer

Solution code:
S = input()
if 'hi' in S :
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()

l = len(s)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A=input()
p='h'
q='i'
for i in range(11):
    if A==p or A==q:
        print('Yes')
        break
    else:
        p=p + 'i'
        q=q + 'h'
        i=i+1
        if A==p or A==q:
            print('Yes')
            break
        else:
            p=p + 'h'
            q=q + 'i'
            i=i+1
print('No')

Submission status: Wrong Answer

Solution code:
try:
  s = input()
  s = s.replace('hii', 'xxx')
  #print(s)

  if "hi" in s:
    print("Yes")
  else: print("No")
    
except:
  print("No")

Submission status: Wrong Answer

Solution code:
n=input()
if "hi" in n :
  print("Yes")
else :
  print("No")

Submission status: Wrong Answer

Solution code:
A=input()
p='h'
q='i'
for i in range(11):
    if A==p or A==q:
        print('Yes')
        break
    else:
        p=p + 'i'
        q=q + 'h'
        i=i+1
        if A==p or A==q:
            print('Yes')
            break
        else:
            p=p + 'h'
            q=q + 'i'
            i=i+1

Submission status: Wrong Answer

Solution code:
S = input()
 
j_S = 'hi'
j_b = ['a','i','o','u','e']
#j_b2 =  ['a','o','u','e']

if len(S) > 1:
    if not j_S in S:
        print('No')    
    else:
        i = 0
        S_1 = S.replace(j_S,'X')
        for in_b in j_b:
            j_S_b = 'X' + in_b
            if j_S_b in S:
                S_1 = S_1.replace(j_S_b, 'Y')
        
        
        
        if 'X' in S_1:
            if S_1.startswith('X'):
                print('Yes')
            else:
                print('No')
        else:
            print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
h=input()

a=0

if "h" in h:
  id=[i for i,k in enumerate(h) if k=="h"]
  
  for l in id:
    if "hi" in h[l:l+2]:
      if "ii" not in h[l+1:l+3]:
        a+=1
      elif "ii" in h[l+1:l+3]:
        a+=0
    elif "hi" not in h[l:l+2]:
      a+=0
        
if "h" not in h:
  a+=0
  
if a>0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S = str(input().strip())
target = 'hi'
index = S.find(target)
if 10 >index > -1:
    print('Yes')
else:
    print('No')
index = -1

Submission status: Wrong Answer

Solution code:
import re

try:
  s = input()
except:
  print("No")
  
s = s.replace('hii', 'xxx')
#print(s)

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

Submission status: Wrong Answer

Solution code:
A=input()
p='h'
q='i'
for i in range(11):
    if A==p or A==q:
        print('Yes')
        break
    else:
        p=p + 'i'
        q=q + 'h'
        i=i+1

Submission status: Wrong Answer

Solution code:
S = input()
 
j_S = 'hi'
j_b = ['a','i','o','u','e']
#j_b2 =  ['a','o','u','e']

if len(S) > 1:
    if not j_S in S:
        print('No')    
    else:
        i = 0
        S_1 = S.replace(j_S,'X')
        for in_b in j_b:
            j_S_b = 'X' + in_b
            if j_S_b in S:
                S_1 = S_1.replace(j_S_b, 'Y')
        
        
        
        if 'X' in S_1:
            if S_1.startswith('X'):
                print('Yes')
        else:
            print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = input()

if s == "hi" or s== "hihi" or s== "hihihi" or s =="hiihihihi" or s =="hihihihihi":
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = str(input().strip())
target = 'hi'
index = S.find(target)
if 10 >index > -1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import re
S = input()
if re.match(r'^(hi)*',S):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()
 
j_S = 'hi'
j_b = ['a','i','o','u','e']
j_b2 =  ['a','o','u','e']

if len(S) > 1:
    if not j_S in S:
        print('No')    
    else:
        i = 0
        S_1 = S.replace(j_S,'X')
        for in_b in j_b:
            j_S_b = 'X' + in_b
            if j_S_b in S:
                S_1 = S_1.replace(j_S_b, 'Y')
        
        
        
        if 'X' in S_1:
            print('Yes')
        else:
            print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import re

try:
  s = input()
except:
  print("No")
  
s = s.replace('hii', '')
#print(s)
if "hii" in s:
  print("No")
else:
  if "hi" in s:
    print("Yes")
  else: print("No")

Submission status: Wrong Answer

Solution code:
import re

try:
  s = input()
except:
  print("No")
  
s = s.replace('hii', '')
print(s)
if "hii" in s:
  print("No")
else:
  if "hi" in s:
    print("Yes")
  else: print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
text = input()
answer = "No"
#print(text)
if "hi" in text:
    if "hii" in text:
        answer = "No"
    else:
        answer = "Yes"

print(answer)

Submission status: Wrong Answer

Solution code:
import re
S = input()
if re.match(r'(hi)(hi)*',S):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import re
S = input()
if re.match(r'(hi)+',S):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
f=0
s=list(input())
for j in range(len(s)):
    if s[j]=='h' and s[j+1]=='i':
        print('Yes')
        f=1
        break
if f==0:
    print('No')

Submission status: Wrong Answer

Solution code:
input_line = input()
input_num = len(input_line)
ans = 'Yes'
num = 0
for i in range(input_num):
  if num == 0:
    if input_line[i] == 'h':
      if i + 1 < input_num:
        if input_line[i + 1] == 'i':
          num = 1
          ans = 'Yes'
        else:
          ans = 'No'
    else:
      ans = 'No'
  else:
    num = 0
print(ans)

Submission status: Wrong Answer

Solution code:
import re
S = input()
if re.match(r'(hi)*',S):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()
 
j_S = 'hi'
j_b = ['a','i','o','u','e']
j_b2 =  ['a','o','u','e']

if len(S) > 2:
    if not j_S in S:
        print('No')    
    else:
        i = 0
        for in_b in j_b:
            j_S_b = j_S + in_b
            if j_S_b in S:
                i+=1
        for in_b in j_b2:
            j_S2_b = 'h' + in_b
            if j_S2_b in S:
                i+=1
        
        
        if i==0:
            print('Yes')
        elif i > 0:
            print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
f=0
s=list(input())
for j in range(len(s)-1):
    if s[j]=='h' and s[j+1]=='i':
        print('Yes')
        f=1
        break
if f==0:
    print('No')

Submission status: Wrong Answer

Solution code:
import re
index = re.search(r'{(hi)+}', input())
if index:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S=input("")
if S=="hi" or S=="hihi":
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
text = input()
answer = "No"
#print(text)
if "hi" in text:
    if "ii" in text:
        answer = "No"
    else:
        answer = "Yes"

print(answer)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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

    return 'Yes'


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

Submission status: Wrong Answer

Solution code:
hit_h = False
hit_i = False

result = 'No'
for i in input() + ' ':
  if not hit_h:
    if i == 'h':
      hit_h = True
  else:
    if i == 'i':
      if not hit_i:
        hit_i = True
      else:
        hit_h = False
        hit_i = False
    else:
      if hit_i:
        result = 'Yes'
      else:
        if i == 'h':
          hit_h = True
        else:
          hit_h = False
          hit_i = False
print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
h = input()

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

Submission status: Wrong Answer

Solution code:
input_line = input()
input_num = len(input_line)
ans = 'Yes'
num = 0
for i in range(input_num):
  if num == 0:
    if input_line[i] == 'h':
      if i + 1 < input_num:
        if input_line[i + 1] == 'i':
          num = 1
        else:
          ans = 'No'
          break
    else:
      ans = 'No'
      break
  else:
    num = 0
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()
#print(S)
ss = S.split('hi')
#print(ss)
len_sum = sum([len(x) for x in ss])
#print(len_sum)
print(len_sum == 0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
try:
  s = input()
except:
  print("No")
if "hii" in s:
  print("No")
else:
  if "hi" in s:
    print("Yes")
  else: print("No")

Submission status: Wrong Answer

Solution code:
hit_h = False
hit_i = False

result = 'No'
for i in input() + ' ':
  if not hit_h:
    if i == 'h':
      hit_h = True
  else:
    if i == 'i':
      if not hit_i:
        hit_i = True
      else:
        hit_h = False
        hit_i = False
    else:
      if hit_i:
        result = 'Yes'
      else:
        if not i == 'h':
          hit_h = False
print(result)

Submission status: Wrong Answer

Solution code:
n = raw_input()

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

Submission status: Wrong Answer

Solution code:
h=input()

id=[i for i,k in enumerate(h) if k=="h"] 

a=0

for l in id:
  if "hi" in h[l:l+2]:
    if "ii" not in h[l+1:l+3]:
      a+=1
    elif "ii" in h[l+1:l+3]:
      a+=0
  elif "hi" not in h[l:l+2]:
    a+=0
        
if "h" not in h:
  a+=0
  
if a>0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
import re
index = re.match(r'(hi)+(.*?)', input())
if index:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
s = s.split('hi')
s = set(s)
if 'hi' in s:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
h=input()

id=[i for i,k in enumerate(h) if k=="h"] 

a=0

for l in id:
  if "h" in h[l:l+2]:
    if "ii" not in h[l+1:l+3]:
      a+=1
    elif "ii" in h[l+1:l+3]:
      a+=0
  elif "hi" not in h[l:l+2]:
    a+=0
        
if "h" not in h:
  a+=0
  
if a>0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
hit_h = False
hit_i = False

result = 'No'
for i in input() + ' ':
  if not hit_h:
    if i == 'h':
      hit_h = True
  else:
    if i == 'h':
      continue
    if i == 'i':
      if not hit_i:
        hit_i = True
      else:
        hit_h = False
        hit_i = False
    else:
      if hit_i:
        result = 'Yes'
      else:
        hit_h = False

print(result)

Submission status: Wrong Answer

Solution code:
import re
S = input()
word = r'(hi)+'
if re.match(word,S):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
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"
print(hitachi)

Submission status: Wrong Answer

Solution code:
s = input()
s = s.split('hi')
s = set(s)
if len(s) == 1:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s  = input().replace('hii', 'q')
if s.count('hi') > 0:
        print('Yes')
else:
        print('No')

Submission status: Wrong Answer

Solution code:
n = raw_input()

if 'hii' in n:
  print("No")
elif 'hhi' in n:
  print("No")
elif 'hihi' in n:
  print("Yes")
elif 'hi' in n:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S = str(input())
ans = 0
if len(S) == 1:
    print('No')
    ans = 1
if S[-1] == 'h' and ans != 1:
    print('No')
    ans = 1
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] == 'h' and S[i+1] != 'i' and ans != 1:
        print('No')
        ans = 1
        break
if ans == 0:
    print('Yes')

Submission status: Wrong Answer

Solution code:
hit_h = False
hit_i = False

result = 'No'
for i in input() + ' ':
  if not hit_h:
    if i == 'h':
      hit_h = True
  else:
    if i == 'i':
      if not hit_i:
        hit_i = True
      else:
        hit_h = False
        hit_i = False
    else:
      if hit_i:
        result = 'Yes'
      else:
        hit_h = False

print(result)

Submission status: Wrong Answer

Solution code:
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"
print(hitachi)

Submission status: Wrong Answer

Solution code:
s = input()
s = s.split('hi')
s = set(s)
if len(s) == 1:
  print(True)
else:
  print(False)

Submission status: Wrong Answer

Solution code:
S = input()
 
j_S = 'hi'
j_b = ['a','i','o','u','e']
j_b2 =  ['a','o','u','e']

if len(S) > 1:
    if not j_S in S:
        print('No')
    else:
        i = 0
        for in_b in j_b:
            j_S_b = j_S + in_b
            if j_S_b in S:
                i+=1
                S = S.replace(j_S_b, "X")
        if i==0:
            print('Yes')
        elif i > 0:
            if j_S in S:
                print('Yes')
            else:
                print('No')
            
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = raw_input()

if 'hii' in n:
  print("No")
elif 'hihi' in n:
  print("Yes")
elif 'hi' in n:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s = str(input())
strJudge = 'No'
if 'hi' in s:
    strJudge = 'Yes'

if len(s) == 3:
    s = s.replace('hi','')

if len(s) == 1:
    strJudge = 'No'

print(strJudge)

Submission status: Wrong Answer

Solution code:
n = raw_input()

if 'hii' in n:
  print("No")
elif 'hi' in n:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S = str(input())
ans = 0
if len(S) == 1:
    print('No')
    ans = 1
if S[-1] == 'h' and ans != 1:
    print('No')
    ans = 1
for i in range(len(S)-1):
    if (S[i] != 'h' or S[i] != 'i') 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')

Submission status: Wrong Answer

Solution code:
print(input)

Submission status: Wrong Answer

Solution code:
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:
    print("No")
    f = 1
if f == 0:
    print("Yes")

Submission status: Wrong Answer

Solution code:
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()
print('No')

Submission status: Wrong Answer

Solution code:
A=input()
if 'hi' in A:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import re
S = input()
if (S.count('hi') > 0):
  if (re.search('[^a-z]+hi',S)):
    print('No')
  elif (re.search('hi+[^h]',S)):
    print('No')
  elif (re.search('[^a-z]+hi+[^h]',S)):
    print('No')
  else:
    print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

y = 0

for i in range(len(x)):
    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")

Submission status: Wrong Answer

Solution code:
s = input()

a = 0
if 'hi' in s:
  if 'hii' not in s:
    if 'hhi' not in s:
      a += 1
    
if a == 1:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
S = input() #ここで標準入力
if S.count('hi') == 0:
	print('No')
elif S.count('hii') == S.count('hi'):
	print('No')
elif S.count('hi') > 0:
  	print('Yes')
else:
  	print('No')

Submission status: Wrong Answer

Solution code:
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:
    print("Yes")

Submission status: Wrong Answer

Solution code:
S = input()
 
j_S = 'hi'
j_b = ['a','i','o','u','e']
j_b2 =  ['a','o','u','e']

if len(S) > 1:
    if not j_S in S:
        print('No')    
    else:
        i = 0
        for in_b in j_b:
            j_S_b = j_S + in_b
            if j_S_b in S:
                i+=1
        for in_b in j_b2:
            j_S2_b = 'h' + in_b
            if j_S2_b in S:
                i+=1
        
        if S.endswith("hi"):
            i+=1
        
        if i==0:
            print('Yes')
        elif i > 0:
            print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = raw_input()

if 'hi' in n:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = str(input())
strJudge = 'No'
if 'hi' in s:
    strJudge = 'Yes'

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

if len(s) == 1:
    strJudge = 'No'

print(strJudge)

Submission status: Wrong Answer

Solution code:
a=input()
ans="No"

for i in range(1,len(a)):
	if a[i-1]+a[i]=="hi":
		ans="Yes"
	else:
		ans="No"
		break
print(ans)

Submission status: Wrong Answer

Solution code:
#1 question on hitachi contest
class Solution:
    def answer(self, str_in):
        n = len(str_in)
        if n == 1:
            return "No"
        
        
        arr = []

        for i in str_in:
            if i == 'h':
                arr.append(i)
            elif i == 'i':
                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))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
 
 
def main():
 
    in_data = input()
 
    if 'hi' in in_data:
        print('Yes')
    else:
        print('No')
 
    return 0
  
  
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
s = str(input())
strJudge = 'No'
if 'hi' in s:
    strJudge = 'Yes'

if len(s) == 1:
    strJudge = 'No'

print(strJudge)

Submission status: Wrong Answer

Solution code:
S = input() #ここで標準入力
if S.count('hi') == 0:
	print('No')
elif S.count('hii') == S.count('hi'):
	print('No')
elif S.count('hi') > 0:
  	print('Yes')

Submission status: Wrong Answer

Solution code:
import re
S = input()
word = '(hi)+'
if re.match(word,S):
    print('Yes')
else:
    print('No')