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()
count = 0
count_h = 0
count_i = 0
frag = 0
for i in range(len(S)-1):
  if S[i] == 'h' and S[i+1] == 'i':
    count = 1
for i in range(len(S)):
  if S[i] == 'h':
    count_h = count_h+1
  elif S[i] == 'i':
    count_i = count_i+1
if S[0] != 'h':
  frag = 1
if count == 1 and len(S)%2 == 0 and count_h == count_i and frag == 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
S = input()
count = 0
count_h = 0
count_i = 0
for i in range(len(S)-1):
  if S[i] == 'h' and S[i+1] == 'i':
    count = 1
for i in range(len(S)):
  if S[i] == 'h':
    count_h = count_h+1
  elif S[i] == 'i':
    count_i = count_i+1
    
if count == 1 and len(S)%2 == 0 and count_h == count_i:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
count = 0
frag = 0
for i in range(len(S)-1):
  if S[i] == 'h' and S[i+1] == 'i':
    count = 1
if S[0] != 'h':
  frag = 1
if count == 1 and len(S)%2 == 0 and frag == 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
S = input()
count = 0
for i in range(len(S)-1):
  if S[i] == 'h' and S[i+1] == 'i':
    count = 1    
if count == 1 and len(S)%2 == 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

S_size = len(S)
S_hi = S.count('hi')

if S_size == S_hi:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import re

S = input().lower()
# if len(S) >= 1 and len(S) <= 10:
#     print(S)

i = 1
while i <= 5:
  if S == ("hi" * i):
    print("Yes")
    break
  i += 1
print("No")

Submission status: Wrong Answer

Solution code:
import re

S = input().lower()
# if len(S) >= 1 and len(S) <= 10:
#     print(S)

i = 1
while i <= 5:
  if S == ("hi" * i):
    print("yes")
    break
  i += 1
print("no")

Submission status: Wrong Answer

Solution code:
def solve(s):
    return "Yes" if "hi" in s else "No"

assert solve("hihi") == "Yes"
assert solve("hi") == "Yes"
assert solve("ha") == "No"
s = input()
print(solve(s))

Submission status: Wrong Answer

Solution code:
S = input()

if len(S) % 2 != 0:
    print("No")
    exit()
    
for i in range(len(S)-1):
    if i % 2 == 0:
        if S[i] == "h":
            pass
        else:
            print("No")
            exit()
    else:
        if S[i] == "i":
            pass
        else:
            print("No")
            exit()

print("Yes")

Submission status: Wrong Answer

Solution code:
S = input()

for i in range(len(S)-1):
    if S[i] == "h" and S[i+1] == "i":
        print("Yes")
        exit()
        
print("No")

Submission status: Wrong Answer

Solution code:
S = input()
if S.count('hi') is 0 or S.count('hi') > 10:
    print('No')
print('Yes')

Submission status: Wrong Answer

Solution code:
S = input()
if S.count('hi') is 0 or S.count('hi') > 10:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()
if S.count('hi') is 0:
    print('No')
print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
MAX_N = 1 << 17
INF = 10 ** 18

n, dat = 0, [2 * MAX_N - 1]

def init(n_):
    n = 1
    while n < n_:
        n *= 2
    for i in range(2 * n - 1):
        dat[i] = INT_MAX

def update(k, a):
    k += n - 1
    dat[k] = a
    while k > 0:
        k = (k - 1) // 2
        dat[k] = min(dat[k * 2 + 1], dat[k * 2 + 2])

def query(a, b, k, l, r):
    if r <= a | b <= 1:
        return INF
    else:
        vl = query(a, b, k * 2 + 1, l, (l + r) // 2)
        vr = query(a, b, k * 2 + 2, (l + r) // 2, r)
        return min(vl, vr)

Submission status: Wrong Answer

Solution code:
s=input()
l=len(s)
for i in range(l-1):
  tmp=s[i]+s[i+1]
  if tmp=='hi':
    print('Yes')
    break
else:
  print('No')

Submission status: Wrong Answer

Solution code:
hitachi = list(input())

if len(hitachi) % 2 == 1:
    print("NO")

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

    if H == True:
        print("YES")
    else:
        print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = raw_input()
if type(S) == 'string':
  if 'hi' in S:
      print 'Yes'
  else:
      print 'No'
else:
  print 'No'

Submission status: Wrong Answer

Solution code:
tf = True
s=input()
for i in range(len(s)):
  if i%2==0:
    if s[i]!="h":
      tf = False
  else:
    if s[i]!="i":
      tf = False
if tf:
  print("Yes")
else:
  print('No')

Submission status: Wrong Answer

Solution code:
tf = False
s=input()
for i in range(len(s)):
  if i%2==0:
    if s[i]!="h":
      tf = False
  else:
    if s[i]!="i":
      tf = False
if tf:
  print("Yes")
else:
  print('No')

Submission status: Wrong Answer

Solution code:
S = raw_input()
if 'hi' in S:
    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:
s = input()
result = 'No'
start = -2
end = -2
for i, c in enumerate(s):
  if c == 'h':
    start = i
  elif c == 'i':
    if i == start+ 1:
      result = 'Yes'
      end = i
    elif i == end+1:
      result = 'No'
      break
  else:
    result = 'No'
    break

print(result)

Submission status: Wrong Answer

Solution code:
s = input()
result = 'No'
start = -2
end = -2
for i, c in enumerate(s):
  if c == 'h':
    start = i
  elif c == 'i':
    if i == start+ 1:
      result = 'Yes'
      end = i
    elif i == end+1:
      result = 'No'
      break

print(result)

Submission status: Wrong Answer

Solution code:
s = input()
result = 'No'
start = -2
end = -2
for i, c in enumerate(s):
  #print(i, c)
  if c == 'h':
    start = i
  elif c == 'i' and i == (start + 1):
    result = 'Yes'
    end = i
  elif c == 'i' and i == (end + 1):
    result = 'No'

print(result)

Submission status: Wrong Answer

Solution code:
import re

s = input()
result = 'No'
start = -2
end = -2
for i, c in enumerate(s):
  #print(i, c)
  if c == 'h':
    start = i
  elif c == 'i' and i == (start + 1):
    result = 'Yes'
    end = i
  elif c == 'i' and i == (end + 1):
    result = 'No'

print(result)

Submission status: Wrong Answer

Solution code:
s=input()
s+="aa"
count=0
for i in range(len(s)):
	if s[i:i+2]=="hi" and s[i+2]!="i":
		count+=1
if count!=0:
	print("Yes")
else:
	print("No")

Submission status: Wrong Answer

Solution code:
S = input()

X = ["hi" * i for i in range(5)]
if S in X:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
from copy import deepcopy
string_in = input()
count_num = 0
for i in range(10):
  count_num += string_in.count('%d'%(i))
if count_num==0:
  check_str = "hi"        
  max_count = string_in.count(check_str)
  check_obj = ["hi"*i for i in range(1,max_count+1)][::-1]
  string_in4 = deepcopy(string_in)
  count = 0
  for i in range(len(check_obj)):
    i_str = str(check_obj[i])
    string_in4 = string_in4.replace(i_str, '%d'%(i))
    count += string_in4.count('%d'%(i))
  if count==0:
    print("No")
  else:
    print("Yes")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8

s = input()
check = True
for i in range(len(s)):
    char = ''
    if i % 2 == 0:
        char = 'h'
    else:
        char = 'i'
    if s[i] != char:
        check = False
        break
    
print('Yes' if check else 'No')

Submission status: Wrong Answer

Solution code:
S=input()
SET=set(list(S))

if ("h" in SET) and ("i" in SET) and len(SET)==2:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S = list(input())
flug = True
for i in range(0,len(S),2):
    if i+1 < len(S):
        st = S[i] + S[i + 1]

        if st != "hi":
            flug = False
    else:
        flug = False

if flug == True:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
s=input()
f=1
if len(s)>1:
    for i in range(len(s)-1):
        if s[i]=='h':
            if s[i+1]!='i':
                f=-1
                break
        if s[i]=='i':
            if s[i+1]!='h':
                f=-1
                break
else:
    f=-1
if f==1:
    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:
s = input()
if "hi" in s:
	print ("Yes")
else:
	print ("No")

Submission status: Wrong Answer

Solution code:
st=input()
import re
if re.search(r'hi', st) :
 print ("Yes")
else: print ("NO")

Submission status: Wrong Answer

Solution code:
st=input()
import re

if re.search(r'hi', st) :
 print ("Yes")
else: print ("NO")

Submission status: Wrong Answer

Solution code:
st=input()
fd = st.find('hi')
if st!="hi":
 print ("Yes")
else: print ("NO")

Submission status: Wrong Answer

Solution code:
s = str(input())

result = "No"

for n in range(1,5):
    if 'hi'*n == s:
        result = "Yes"
        break
print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from itertools import combinations
from collections import defaultdict
N = 329280

def divisors(n) -> list:
    res = []
    for i in range(1, int(n ** 0.5) + 1):
        if n % i == 0:
            res.append(i)
            if i != n // i:
                res.append(n // i)
    res = sorted(res)
    return res

div = divisors(N)
#print(div)

alpha = []
for i in range(1, 27):
    if i in div:
        alpha.append(i)
#print(alpha)

L = len(alpha)
#print(L)

arr = []
cnt = defaultdict(int)

for i in range(L ** 4):
    tmp = []
    prod = 1
    for j in range(4):
        k = (i // L ** j) % L
        tmp.append(alpha[k])
        prod *= alpha[k]
    tmp.sort()
    hsh = 0
    for i in range(4):
        hsh += tmp[i] * 27 ** i
    if cnt[hsh]:
        continue
    else:
        cnt[hsh] = 1
    if prod in div and N % prod == 0 and N // prod in div and prod <= 24 ** 4 and N // prod <= 24 ** 4:
        tmp = [prod] + tmp
        arr.append(tmp)

arr.sort()
#print(arr)

ans = []
for a in arr:
    for b in arr:
        if a[0] * b[0] == N:
            ans.append(sorted(a[1:] + b[1:]))
print(len(ans))

boin = [ord(b) - ord("a") + 1 for b in "aiueo"]

def cnt_boin(s):
    ret = 0
    for ss in s:
        if ss in boin:
            ret += 1
    return ret
    
ans2 = []
for a in ans:
    if cnt_boin(a) >= 3:
        tmp = ""
        for aa in a:
            tmp += chr(aa + ord("a") - 1)
        if "x" not in tmp and "l" not in tmp and "j" not in tmp:
            ans2.append(tmp)
print(len(ans2))

Submission status: Wrong Answer

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from operator import mul
from functools import reduce
import pprint
sys.setrecursionlimit(10 ** 9)


INF = 10 ** 20
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007


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

Submission status: Wrong Answer

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from operator import mul
from functools import reduce
import pprint
sys.setrecursionlimit(10 ** 9)


INF = 10 ** 20
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007


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

Submission status: Wrong Answer

Solution code:
s = input()
if s[:2] == "hi":
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

if s.count("hi") > 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    S=input()
    i=0
    j=len(S)
    if j%2==0:
        for l in range(0,len(S),2):
            i=0
            if(S[l]=='h' and S[l+1]=='i'):
                i=1
    if i==1:
        print('Yes')
    else:
        print('NO')

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    S=input()
    i=0
    j=len(S)
    print(j)
    if j/2==0:
        for l in range(0,len(S),2):
            i=0
            if(S[l]=='h' and S[l+1]=='i'):
                i=1
    if i==1:
        print('Yes')
    else:
        print('NO')

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    S=input()
    i=0
    j=len(S)
    print(j)
    if j/2==0:
        for l in range(0,len(S),2):
            print(l)
            i=0
            if(S[l]=='h' and S[l+1]=='i'):
                i=1
    if i==1:
        print('Yes')
    else:
        print('NO')

Submission status: Wrong Answer

Solution code:
s = input()
_s = set('hi')
print('Yes' if set(s) == _s else 'No')

Submission status: Wrong Answer

Solution code:
s = input("")
t = len(s)
a = 0
for i in range(t-1):
    if s[i] == "h" and s[i+1] == "i":
        a += 1
if a >= 1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input("")
t = len(s)
a = 0
for i in range(t-1):
    if s[i] == "h" and s[i+1] == "i":
        a += 1
if a == 1:
    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:
s = input()
r = True
for i in range(0, len(s)-1, 2):
  if s[i:i+2] != "hi":
    r = False
print("Yes" if r else "No")

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

if s.find("hi")==-1:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
import sys
S = input()
l = len(S)
#print(l)
if "hi" in S:
  for i in range(l-1):
    if S[i]=="i" and S[i+1]=="i":
      print("No")
      sys.exit()
  print("Yes")
      
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S = input()
S2 = ['hi', 'hihi', 'hihihi', 'hihihihi', 'hihihihihi']

if S in S2:
    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:
s=input()
print("Yes" if "hi" in s else "No")

Submission status: Wrong Answer

Solution code:
import sys
c = input()
for i in range(5):
    if c == "hi"*i:
        print("Yes")
        sys.exit()
print("No")

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
n1=0
n2=0
for i in range(N):
 if S[i]=="h":
  n1=n1+1
 if S[i]=="i":
  n2=n2+1

if (n1==n2)and(n1+n2==N):
 print("Yes")
else:
 print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
n1=0
n2=0
for i in range(N):
 if S[i]=="h":
  n1=n1+1
 if S[i]=="i":
  n2=n2+1

if (n1==n2)and(n1==N/2):
 print("Yes")
else:
 print("No")

Submission status: Wrong Answer

Solution code:
S=input()

def No():
    print("No")
def Yes():
    print("Yes")

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

Submission status: Wrong Answer

Solution code:
S=input()

def No():
    print("No")
def Yes():
    print("Yes")

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

Submission status: Wrong Answer

Solution code:
S=input()

def No():
    print("No")
def Yes():
    print("Yes")

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

Submission status: Wrong Answer

Solution code:
s = str(input())
if len(s)%2 != 0:
  print("No")
  exit()
for i in range(len(s)//2):
  if s[i:i+2] != "hi":
    print("No")
    exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
s = str(input())
if len(s)%2 != 0:
  print("No")
  exit()
for i in range(len(s)//2):
  if s[i:i+1] != "hi":
    print("No")
    exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
import re

s = 'hi'
flag = True

s_array = s.split('hi')
    
for list in s_array:
    res = re.match('[a-z0-9]', list)
    
    if res and len(res.group()) > 0 :
        flag = False
        break
            
if flag:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = 'hihi'

s_array = s.split('hi')

if len(s_array) > 1:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
S = input()
result = ["Yes" if (len(S) > 1) and (S[-2] == "h") and (S[-1] == "i") else "No"]
p = list(map(print, result))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
a=0
for i in range(len(s)-1):
  if s[i]=="h":
    if s[i+1]=="i":
      a=1
if a==0:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
S = input()
for i in range(5):
    x = 'hi'*i
    if S == x:
        print('Yes')
        break;
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
x=input()
if x == 'hi':
	print('Yes')
elif x == 'hihi':
	print('Yes')
elif x == 'hihihi':
	print('Yes')
elif x == 'hihihihi':
	print('Yes')
elif x == 'hihihihihi':
	print('Yes')
else:
	print('NO')

Submission status: Wrong Answer

Solution code:
S = input()
mituke = S.find("h")
if mituke == -1 or mituke == len(S)-1 :
    print("No")
elif S[mituke +1] == "i" :
    print("Yes")
else :
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()

s.replace('hi', '')

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

Submission status: Wrong Answer

Solution code:
S=list(input())
a=0
for i in range(len(S)-1):
    if S[i]=="h":
        if S[i+1]!="i":
            a=1
            break
if a==0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S=input()
while len(S)>=2:
  if S[0:2]=='hi':
    S=S[2:]
  else:
    break
if len(S)==0:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
S=input()
while len(S)>=2:
  if S[:2]=="hi":
    S=S[2:]
  else:
    break
if len(S)==0:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
hi = input()
print("Yes" if set(hi[0::2]) == {"h"} and set(hi[1::2]) == {"i"} else "No")

Submission status: Wrong Answer

Solution code:
S=input()
while len(S)>=2:
  if S[:2]=='hi':
    S=S[2:]
  else:
    break
if len(S)==0:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
S=list(input())
a=0
for i in range(len(S)-1):
    if S[i]=="h":
        if S[i+1]=="i":
            a=1
            break
if a==1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S=input()
h="hi"
for i in range(5):
  if h*i==S:
    print("Yes")
    break
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s = input()
if len(s)&1 == 1:
  print("no")
elif all(["hi" == s[i:i+2] for i in range(0, len(s), 2)]):
  print("yes")
else:
  print("no")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
*s, = input()

ans = "Yes"
for i in range(0, len(s)-1, 2):
    if s[i] != "h" or s[i+1] != "i":
        ans = "No"
        break

print(ans)

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

ans=0
for i in range(len(s)):
    if s[i]=="h":
        if i<len(s)-1:
            if s[i+1]=="i":
                ans=1
                break
if ans==1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s=input()
print(len(s))
for i in range(len(s)):
    if s[i]=="h":
        if i<len(s)-1:
            if s[i+1]=="i":
                print("Yes")
                break
print("No")

Submission status: Wrong Answer

Solution code:
s=input()
print(len(s))
for i in range(len(s)):
    if s[i]=="h":
        if i<len(s)-1:
            if s[i+1]=="i":
                print("Yes")
                break
        else:
            print("No")
            break

Submission status: Wrong Answer

Solution code:
# A - Hitachi String
def main():
    S = input().rstrip()
    is_hi = any(i + j == "hi" for i, j in zip(S, S[1:]))
    print("Yes" if is_hi else "No")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
# A - Hitachi String
def main():
    S = input().rstrip()
    print("Yes" if "hi" in S else "No")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
S = input()
S_len = len(S)

for i in range(S_len):
    if i == S_len - 1:
        print("No")
    if S[i] == "h":
        if S[i+1] == "i":
            print("Yes")
            break

Submission status: Wrong Answer

Solution code:
s=input()
 
for i in range(len(s)):
  if s[i-1]=="h":
    if s[i]=="i":
      print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
S = input()

L = len(S)

def print_ans():
    for i in range(L):
        if i % 2 == 0 and S[i] != 'h':
            print("No")
            return
        if i % 2 == 1 and S[i] != 'i':
            print("No")
            return

    print("Yes")

print_ans()

Submission status: Wrong Answer

Solution code:
s=input()
 
for i in range(len(s)):
  if s[i-1]=="h":
    if s[i]=="i":
      print("Yes")
print("No")

Submission status: Wrong Answer

Solution code:
s=input()
 
for i in range(len(s)):
  if s[i-1]=="h":
    if s[i]=="i":
      print("yes")
print("no")

Submission status: Wrong Answer

Solution code:
S = input()

ans = "No"

for i in range(len(S) - 1):
  if S[i] == "h" and S[i + 1] == "i":
    if i == len(S) - 2:
      ans = "Yes"
      break
    else:
      if S[i + 2] != "i":
        ans = "Yes"
        break

print(ans)

Submission status: Wrong Answer

Solution code:
S = input()

ans = "No"

for i in range(len(S) - 2):
  if S[i] == "h" and S[i + 1] == "i":
    if i == len(S) - 2:
      ans = "Yes"
      break
    else:
      if S[i + 2] != "i":
        ans = "Yes"
        break

print(ans)

Submission status: Wrong Answer

Solution code:
hi = "hi"
hii = "hii"
S = input()

ans = "No"

if hi in S and hii not in S:
  ans = "Yes"
    
print(ans)

Submission status: Wrong Answer

Solution code:
hi = "hi"
S = input()

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

Submission status: Wrong Answer

Solution code:
import re
import sys
s = input()
l = re.split('(..)', s)[1::2]

judge = [c=="hi" for c in l]
if len(l) == 0:
  print("No")
  sys.exit()
  
if len(l) %2 != 0:
  print("No")
  sys.exit()
  
if all(judge):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
import re
import sys
s = input()
l = re.split('(..)', s)[1::2]

judge = [c=="hi" for c in l]
if len(l) == 0:
  print("No")
  sys.exit()
  
if all(judge):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
import re
s = input()
l = re.split('(..)', s)[1::2]
judge = [c=="hi" for c in l]
if all(judge):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

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()
flag = False
for i in range(len(s) - 1):
    if s[i:i + 2] == 'hi':
        flag = True
if flag: print('Yes')
else: print('No')

Submission status: Wrong Answer

Solution code:
import re
s = input()

if re.match("(hi)+",s):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
def check_hitach(check):
  if check == "hi":
    print("Yes")
  elif check == "hihi":
    print("Yes")
  elif check == "hihihi":
    print("Yes")
  else:
    print("No")
S = input()
check_hitach(S)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import re
s = str(input())
p = re.compile("(hi)+")
m = p.match(s)
if m is not None:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s=list(input())
ans=0
for i in range(len(s)-2):
    if s[i] =="h":
        if s[i+1] == "i":
            if s[i+2] != "i":
                ans+=1
                break

if s[len(s)-2] =="h":
    if s[len(s)-1] =="i":
        ans+=1

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

Submission status: Wrong Answer

Solution code:
s=list(input())
ans=0
for i in range(len(s)-2):
    if s[i] =="h":
        if s[i+1] == "i":
            if s[i+2] != "i":
                ans+=1
                break
if ans > 0:
    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:
print("YNeos"["hi" not in input()::2])

Submission status: Wrong Answer

Solution code:
a='hi'
b=''
p=[]
for i in range(6):
    b+=a
    p.append(a)
s=input()
print('Yes' if s in p else 'No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

if S[0:2]=='hi':
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = input()

if set(s) == {'h', 'i'} and len(s) <= 10:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
str = input()
count  = str.count("hi")
if count > 0 :
  print("Yes")
else :
  print("No")

Submission status: Wrong Answer

Solution code:
import sys
S = str(input())

for i,s in enumerate(S):
    if i % 2 == 1:
        if not s == "i":
            print("No")
            sys.exit()
    else:
        if not s == "h":
            print("Ño")
            sys.exit()

print("Yes")

Submission status: Wrong Answer

Solution code:
S = str(input())
for i,s in enumerate(S):
    if i % 2 == 1:
        if not s == "i":
            print("No")
            exit()
    else:
        if not s == "h":
            print("Ño")
            exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
str = input()
print(str)

Submission status: Wrong Answer

Solution code:
S = input()
flag = 1
for i in range(len(S)-1,2):
  if not(S[i]=='h' and S[i+1]=='i'):
    flag = 0
    break
    
if flag:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s=input()

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

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

Submission status: Wrong Answer

Solution code:
s=input()

flag = False
for i in range(len(s)-1):
    if s[i]=="h":
        if s[i+1]=="i":
            flag=True
        else:
            flag=False

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