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

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)

Submission status: Wrong Answer

Solution code:
s='hi'
print('YNeos'[any(c != s[i & 1] for i, c in enumerate(input()))::2])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
flag = False
try:
    if "hi" in s:
        if s[s.find("hi")+2] == "i":
            flag = False
        elif s[s.find("hi")-1] == "h":
            flag = False
        else:
            flag = True
    else:
        flag = False
except IndexError:
    pass
if flag == False:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
S = input()

if len(S) % 2 == 0:
  if "hi" in S:
    print("Yes")
else:
  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:


def main(S):
    if len(S) / 2 != 0:
        print('No')
        return
        
    for ind in range(0, len(S), 2):
        h = S[ind]
        i = S[ind+1]
        if h != 'h' or i != 'i':
            print('No')
            return
    print('Yes')
    return

S = input()
main(S)

Submission status: Wrong Answer

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

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

hi="hi"

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

Submission status: Wrong Answer

Solution code:
input = input()

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

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

    isHi = True

print(result)

Submission status: Wrong Answer

Solution code:
s=input()
n=len(s)
if n<=1:
  print("No")
  exit()
if s=="hi":
  print("Yes")
  exit()
for i in range(n-1):
  if s[i]=="h" and s[i+1]=="i":
    if i==0 and s[i+2]!="i":
      print("Yes")
      exit()
    if i==n-1 and s[i-1]!="h":
      print("Yes")
      exit()
    if s[i-1]!="h" and s[i+2]!="i":
      print("Yes")
      exit()
print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
a = list(input())
#print(a)
Flag=True
if a.count('h')+a.count('i')!=len(a):
    Flag = False
if a[0::2].count('h')!=len(a)/2:
    print('a')
    Flag = False
if a[1::2].count('i')!=len(a)/2:
    Flag = False

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

Submission status: Wrong Answer

Solution code:
S = input() #ここで標準入力
print('hi' in S)

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 = 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"
print(ans,s)

Submission status: Wrong Answer

Solution code:

input_line = input()
Line = list(input_line)

flag = 0

for i in Line:
    # print(i)

    if i == "h" and flag == 0:
        flag = 1
    elif i == "i" and flag ==1:
        flag = 0
    else:
        flag = 2
        print("No")

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

Submission status: Wrong Answer

Solution code:
S = list(input())

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

print("No")

Submission status: Wrong Answer

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

if('hi' in s):
    txt = 'Yes'
print(txt)

Submission status: Wrong Answer

Solution code:
s = list(input())
flag = True
while s:
    if len(s) == 1:
        ans = False
        break
    if flag:
        if s.pop() == 'i':
            ans = True
            flag = False
        else:
            ans = False
            break
    else:
        if s.pop() == 'h':
            ans = True
            flag = True
        else:
            ans = False
            break
if ans:
    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] == "h" and s[i+1] == "i":
        if i < len(s)-2 and s[i+2] == "i":
            pass
        elif i < len(s)-2 and s[i+2] != "i":
            flag = True
            break
        else:
            flag = True
if flag:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S=input()
ans="No"
flg=0

if len(S) == 1:
  ans="No"
else:
  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
          
if flg==0:
  ans="Yes"
          
print(ans)

Submission status: Wrong Answer

Solution code:
import math
s = input()
n = math.ceil(len(s)/2)
hitachi = ""
for i in range(n):
  hitachi += "hi"
print(hitachi)
if hitachi in s:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
h=input()

if "hi" in h:
  t=h.index("hi")
  if "ii" in h[t+1:]:
    print("No")
  
  else:
    print("Yes")

else:
  print("No")

Submission status: Wrong Answer

Solution code:
# inputs = list(map(int, (input().split())))

a = input()

hi = "hi"

for i in range(5):
    if a == hi:
        print("Yes")
        exit(0)
    hi = hi + hi
print("No")

Submission status: Wrong Answer

Solution code:
S = input()

if 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')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s) // 2
lst = [(i + j) for (i, j) in zip(s[::2], s[1::2])]

check = 0
for i in range(n):
    if lst[i] == 'hi':
        check = 1
    else:
        check = 0
        break

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

Submission status: Wrong Answer

Solution code:
n = input()

ans = "No"
if "hi" in n:
    ans = "Yes"

if "hhi" in n or "hii" in n:
    if n.count("hi") - n.count("hii") - n.count("hhi") == 0:
        ans = "No"

print(ans)

Submission status: Wrong Answer

Solution code:
s=input()
a=s.split('i')
flg = None
for i in a:
  if not i == 'hi':
    flg = False
    break
  else:
    flg = True
if flg == False:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
n = input().split("i")
i = len(n)-1
#print(n)
#print(i)
if i==0:
    print("No")
elif i==1:
    if n[0]=="h":
        print("Yes")
    else:
        print("No")
elif i==2:
    if n[0]==n[1]=="h":
        print("Yes")
    else:
        print("No")
elif i==3:
    if n[0]==n[1]==n[2]=="h":
        print("Yes")
    else:
        print("No")
else:
    if n[0]==n[1]==n[2]==n[3]=="h":
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
input = input()
# input = "hihi"
result = "Yes"
for i in range(len(input)-1):
    if input[i] == "i":
        continue;

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

print(result)

Submission status: Wrong Answer

Solution code:

s = input()

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

print("Yes")

Submission status: Wrong Answer

Solution code:
n = input()
flag = True
for i in range(len(n)-1):
    if i % 2 == 0 and n[i] == 'h' and n[i+1] == 'i':
        continue
    elif i % 2 == 1 and n[i] == 'i' and n[i+1] == 'h':
        continue
    else:
        flag = False
        break
if flag:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = input()
s = list(s)

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

Submission status: Wrong Answer

Solution code:
s=list(input())
for i in range(len(s)):
  if i==len(s)-1:
      print("No")  
  elif s[i]=="h"and s[i+1]=="i":#h a i len(s)=3 range(len(s))=range(3)=[0,1,2] len(s)-1=2
    print("Yes")
    break
  else:
      continue

Submission status: Wrong Answer

Solution code:
import re
S = input()
liS = re.split('(..)', S)[1::2]

if liS == []:
    print('No')
    exit()

for x in liS:
    if x == 'hi':
        pass
    else:
        print('No')
        exit()

print('Yes')

Submission status: Wrong Answer

Solution code:
S=list(str(input()))

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

Submission status: Wrong Answer

Solution code:
s = list(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:
try:
  s = input()
except:
  print("No")

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

Submission status: Wrong Answer

Solution code:
n = input()
flag = True
for i in range(len(n)-1):
    if n[i] == 'h' and n[i+1] == 'i':
        continue
    elif n[i] == 'i' and n[i+1] == 'h':
        continue
    else:
        flag = False
        break
if flag:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = input()

if s.count("hi") > 0:
    if s.count("hii") > 0:
        print("No")
        exit()
    if s.count("ha") > 0:
        print("No")
        exit()
    if s.count("hi") == s.count("hii"):
        print("No")
        exit()
    else:
        print("Yes")
        exit()
print("No")

Submission status: Wrong Answer

Solution code:
S = input()
a = True
for i in range(len(S)//2):
    if len(S) % 2 != 0:
        a = False 
        break
    else:
        if S[i] != 'h' or S[i+1] != 'i':
            a = False

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

S = input()

flag = 0

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

print("Yes")

Submission status: Wrong Answer

Solution code:
s = input()
h_else_i = True

ret = True
for char in s:
  if h_else_i:
    if char == "h":
      h_else_i = not h_else_i
      continue
    else:
      ret = False
      break
  else:
    if char == "i":
      h_else_i = not h_else_i
      continue
    else:
      ret = False
      break
if ret:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s = list(input())
flag = True
while s:
    if flag:
        if s.pop() != 'i':
            ans = False
            break
        else:
            ans = True
            flag = False
    else:
        if s.pop() != 'h':
            ans = False
            break
        else:
            ans = True
            flag = True
if ans:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
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:i*2] != "hi":
      print("No")
      break
    else:
      count += 1
      prev = i * 2
  if count == s_len:
    print("Yes")

Submission status: Wrong Answer

Solution code:
import re
s=input()
a=s.split('i')
for i in a:
  if not i == 'hi':
    print('No')
  else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
from sys import stdin

def main():

    input = stdin.readline

    S = input()[:-1]

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

    for i in range(len(S)//2):
        print(S[i*2:i*2+2])

        if (S[i*2:i*2+2] == "hi"):
            continue
        else:
            print("No")
            return
    
    print("Yes")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
S=str(input())


#if 'hii' in S  and  'hi'  in S:
#    print('Yes')
#elif 'hii' in S:
#    print('No')
if 'hi' in  S:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()
a = True
for i in range(len(S)//2):
    if len(S) % 2 != 0:
        a = False 
        break
    else:
        if i % 2 ==0:
            if S[i] != 'h' or S[i+1] != 'i':
                a = False

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

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
a = True
for i in range(len(S)//2):
    if len(S) % 2 != 0:
        a = False 
        break
    else:
        if i%  2 ==0:
            if S[i] != 'h' or S[i+1] != 'i':
                a = False

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

Submission status: Wrong Answer

Solution code:
n=input()
if(len(n)%2==1):
    print("No")
    exit()
for i in range(int(len(n)/2)):
    if(n[i]=='h'and n[i+1]=='i'):
        flag=1
    else:
        print("No")
        exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
def main(S):
    for i in range(len(S)-2):
        if S[i] == 'h' and S[i+1] == 'i' and S[i+2] != 'i':
            print('Yes')
            return 
    print('No')
    return 

S = input()
main(S)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# A
s = input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=input()

if len(a)//2==1:
  print ('No')
  exit()
else:
  for i in range (len(a)//2):
    if not a[2*i]=='h':
      print('No')
      exit()
    elif not a[2*i+1]=='i':
      print('No')
      exit()
      
print('Yes')

Submission status: Wrong Answer

Solution code:
# import re
s = input()
# m = re.fullmatch(hi{1,10},s):
# if m = "None":
#     print("No")
# else:
#     print("Yes")

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

if s.count("hi") >0:
    if s.count("hi") == s.count("hhi"):
        print("No")
        exit()
    if s.count("hi") == s.count("hii"):
        print("No")
        exit()
    else:
        print("Yes")
        exit()
print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# import re
s = input()
# m = re.fullmatch(hi{1,10},s):
# if m = "None":
#     print("No")
# else:
#     print("Yes")

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
hitachi = input(' please 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):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
print('NYoe s'[('hi'*100000).startswith(input())::2])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
hitachi = input(' please 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):
    print("Yse")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
ret = "No"
if 'hi' in s:
    ret = "Yes"
print("{}".format(ret))

Submission status: Wrong Answer

Solution code:
S=str(input())


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

Submission status: Wrong Answer

Solution code:
import sys

S = input()

flag = False

for s in S:
    if not flag and s == "h":
        flag = True
    elif flag and s != 'i':
        print("No")
        sys.exit()
    elif flag and s == 'i':
        flag = False
    else:
        print("No")
        sys.exit()

print("Yes")

Submission status: Wrong Answer

Solution code:
s = input().split("hi")


if len(set(s)) == 1:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s = input()
s = list(s)

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

Submission status: Wrong Answer

Solution code:
print('NYoe s'[('hi'*1000).startswith(input())::2])

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()
n=len(s)
t=n
if n%2!=0:
    print('No')
else:
    if s[:n//2]==s[n//2:]:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
input = input()
# input = "abc"
result = "No"
for i in range(len(input)-1):
    str = input[i] + input[i+1]
    if str == "hi":
        result = "Yes"
        break

print(result)

Submission status: Wrong Answer

Solution code:
s = input()
if set(s) == {'h', 'i'}:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
str = input()
yes = True
if len(str) < 2:
  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")

Submission status: Wrong Answer

Solution code:
S = input()
a = S.count("hi")
b = S.count("hii"or "hia"or"hiu"or"hie"or"hio")
if a > 0 and b == 0 :
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
L = len(S)
flg = 0
for i in range(L):
    if i % 2 == 0:
        if S[i] != 'h':
            flg = 1
    else:
        if S[i] != 'i':
            flg = 1
if flg == 0:
    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] == "h" and s[i+1] == "i":
        if i < len(s)-2 and s[i+2] == "i":
            flag = False
        elif i < len(s)-2 and s[i+2] != "i":
            flag = True
            break
if flag:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
input_line = input()
Line = list(input_line)

flag = 0

for i in Line:
    print(i)

    if i == "h" and flag == 0:
        flag = 1
    elif i == "i" and flag ==1:
        flag = 0
    else:
        flag = 2
        print("No")

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

Submission status: Wrong Answer

Solution code:
S = input()
a = True
for i in range(len(S)//2):
    if len(S) % 2 != 0:
        a = False 
        break
    else:
        if S[i//2] != 'h' or S[i//2 +1] != 'i':
            a = False
            break

if a == True: 
    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 s == "hi":
  print("Yes")
elif "hihi" in s:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
print('NYoe s'[('hi'*100).startswith(input())::2])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def ishitach(str):

    length_str = len(str)
    start = 0
    end = 2

    while end <= length_str:
        if str[start:end] == 'hi':
            pass
        else:
            return 'No'

        start = start + 2
        end = end + 2

    return 'Yes'


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

Submission status: Wrong Answer

Solution code:
hitachi = input(' please 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"))

if tmp == len(hitachi):
    print("Yse")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
a = True
for i in range(len(S)):
    if len(S) % 2 != 0:
        a = False 
        break
    else:
        if S[i//2] != 'h' or S[i//2 +1] != 'i':
            a = False
            break

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

Submission status: Wrong Answer

Solution code:
s = input()
data = len(s)
s = list(s)
j = 0
for i in s:
  if j%2 == 0:
    if i != "h":
      print("No")
      break
  if j%2 == 1:
    if i != "i":
      print("No")
      break
  j += 1

      
if j == data:
  print("Yes")

Submission status: Wrong Answer

Solution code:
h=input()

if "hi" in h and "hii" not in h:
  
  print("Yes")

else:
  print("No")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

S = str(input())

output = 'No'

if ('hi' in S):

    S = S.replace("hi", "A")

    if ('Ai' in S):
        output = 'No'
    else:
        output = 'Yes'

print(output)

Submission status: Wrong Answer

Solution code:
s = input()
boolJudge = 'No'
hiCheck = False
for char in s:
    if char == 'h':
        hiCheck = True
    elif char == 'i' and hiCheck:
            boolJudge = 'Yes'
            hiCheck = False

print(boolJudge)

Submission status: Wrong Answer

Solution code:
S = input()

for i in range(1,6):
  if S is 'hi'*i:
    print('Yes')
    break
    

else:
  print('No')

Submission status: Wrong Answer

Solution code:
import unittest
from io import StringIO
import sys


def resolve():
    S = input()
    c = list(S)
    if len(c) == 1 or len(c) % 2 != 0:
        print('No')
        return

    if len(c) == 2 and S != 'hi':
        print('No')
        return

    for i in range(0, len(c) - 2, 2):
        if ''.join(c[i:i + 2]) != 'hi':
            print('No')
            return
    print('Yes')


# resolve()


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """hihi"""
        output = """Yes"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """hi"""
        output = """Yes"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """ha"""
        output = """No"""
        self.assertIO(input, output)


if __name__ == "__main__":
    unittest.main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

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] == "h" and s[i+1] == "i":
        if i < len(s)-2 and s[i+2] == "i":
            flag = False
        else:
            flag = True
if flag:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
str = input().lower()
yes = True
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")

Submission status: Wrong Answer

Solution code:
n = input()

ans = "No"
if "hi" in n:
    ans = "Yes"

if "hhi" in n:
    ans = "No"

if "hii" in n:
    ans = "No"
print(ans)

Submission status: Wrong Answer

Solution code:
index = input().find("hi")
if index != -1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def main(S):
    for i in range(len(S)-1):
        if S[i] == 'h' and S[i+1] == 'i':
            print('Yes')
            return 
    print('No')
    return 

S = input()
main(S)

Submission status: Wrong Answer

Solution code:
S = input()
text1 = S.replace("hii","1")
text2 = text1.replace("hi","2")
if '1' in text2:
  print ('No')
elif '2' in text2:
  print ('Yes')
else:
  print ('No')

Submission status: Wrong Answer

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

import sys
import math
import itertools

def main():
    s = sys.stdin.readline().strip()
    if len(s) == 0:
        print("No")
        return

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
s = input()

a = s.count('hi')

if a >= 1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = list(input())
flag = False
for i in range(len(s)):
    if i == len(s)-1:
        if i == 0:
            flag =False
            break
        if s[i]== 'i':
            flag = True
        else:
            flag = False
        break
    if s[i] == 'h':
        if s[i+1] == 'i':
            flag =True
        else:
            flag =False
            break
    elif s[i] == 'i':
        if s[i+1] == 'h':
            flag =True
        else:
            flag =False
            break
    else:
        flag =False
        break
if flag:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s=input()
cc=s.count('hi')
if cc==0:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
s = input()
r = 'Yes'
if len(s) == 1:
    r = 'No'
else:
    for i in range(0, len(s) - 1, 2):
        if s[i] != 'h' or s[i + 1] != 'i':
            r = 'No'
            break
print(r)

Submission status: Wrong Answer

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