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

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

Submission status: Wrong Answer

Solution code:
s = str(input())

if 'hii' or 'chi' in s:
    ans = 'No'
elif 'hi' in s:
    ans = 'Yes'
else:
    ans = 'No'

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

# Author: cr4zjh0bp
# Created: Sun Mar  8 11:28:28 UTC 2020
import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

s = ns()
n = len(s)
cnt = True
i = 0
flag = True
if n == 1:
    print("No")
else:
    while i < n - 1:
        if s[i] != 'h' or s[i + 1] != 'i':
            flag = False
            break
        i += 2

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

Submission status: Wrong Answer

Solution code:
import re

s = input()
s_regex = re.compile(r'hi+')

if s_regex.search(s):
  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()
    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()
if(S=="hi"):
  print("Yes")
elif(S=="hihi"):
  print("Yes")
elif(S=="hihihi"):
  print("Yes")
elif(S=="hihihi"):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
def resolve():
    S = input()
    c = list(S)
    if len(c) < 1:
        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()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = str(input())

if 'hii' in s:
    ans = 'No'
elif 'hi' in s:
    ans = 'Yes'
else:
    ans = 'No'

print(ans)

Submission status: Wrong Answer

Solution code:
S = input()
a = S.count("hi"or"Hi"or"hI"or"HI")
if a > 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

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

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:
x = input()
y = "hi"
for i in range(4):
    if y == x:
        print("Yes")
        break
    y = y + "hi"
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = list(input())
if len(S) == 1:
  print("No")
  exit()
flg = True
for i, s in enumerate(S):
  if i%2 == 0:
    if s != "h":
      flg = False
  else:
    if s != "i":
      flg = False
if flg:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s=list(input())
if len(set(s))==2 and all([i=="h" for i in s[0::2]]) and all([i=="i" for i in s[1::2]]):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import re

s = str(input())
m = re.match(pattern='(hi)+', string=s)
if m:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
S = input()

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

print(getHi(S))

Submission status: Wrong Answer

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

def solve():
    S = input()
    if "hi" in S:
        print("Yes")
    else:
        print("No")

if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

Solution code:
# coding: utf-8
d = {"h":0, "i":0}
S = list(input())
for i in range(len(S)):
    if S[i] != "h":
        if S[i] != "i":
            print("No")
            exit()
        else:
            d["i"] += 1
    else:
        d["h"] += 1
if d["i"] == d["h"] and d["h"] != 0 and d["i"] != 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a  = input()
k = a.count('hi')
if len(a) > 3 and len(a)//2 == k:
  print('Yes')
elif a == 'hii':
  print('No')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = input()
l = n.replace("hi","a")

print("No" if len(set(l)) != 1 else "Yes")

Submission status: Wrong Answer

Solution code:
s = input()

flag = True
for i in range(len(s)//2):
  if (s[i*2] != "h") | (s[i*2+1] != "i"):
    flag = False

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

Submission status: Wrong Answer

Solution code:
s = input()
next_word = 'h'
if len(s) <= 1:
    print('No')
    exit()

for word in s:
    if word != next_word:
        print('No')
        exit()
    elif word == next_word:
        if next_word == 'h':
            next_word = 'i'
        elif next_word == 'i':
            next_word = 'h'
print('Yes')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
a = list(input())
#print(a)

hFlag=False
for i in range(len(a)):
    if not hFlag:
        if a[i]=='h':
            hFlag=True
        else:
            print('No')
            break
    else:
        if a[i]=='i':
            hFlag=False
        else:
            print('No')
            break
    if i ==len(a)-1: print('Yes')

Submission status: Wrong Answer

Solution code:
S = list(input().split())
ans = "No"
if len(S) == 1:
    ans = "No"
else:
    for i in range(len(S)-1):
        if S[i] == "h":
            if S[i+1] == "i":
                ans = "Yes"

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
s = input()
a='hi'
b=0
for n in range(4):
	if s==a*(n+1):
		print("Yes")
		b=1
if b!=1:
	print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
if 'hi' in s:
    print('Yes')
elif 'ha'or'hii' not in s:
    print('No')
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()

n = list(s)

if n == ["h", "i"]:
    print("Yes")

else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
ans = "Yes"
cnt = 0
for i in S:
  if cnt%2==0:
    if i != "h":
      ans = "No"
  else:
    if i != "i":
      ans = "No"
  cnt += 1
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float("inf")


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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
readline = sys.stdin.buffer.readline

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

print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
if len(s) == 1:
    print('No')
    exit()
for i in range(len(s)):
    if i % 2 == 0 and s[i] != 'h':
        print('No')
        exit()
    if i % 2 == 1 and s[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 == 'hihihihihi':
    print('Yes')

else:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys

s = input()
if len(s) % 2 != 0:
  print('No')

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

Submission status: Wrong Answer

Solution code:
S = input()
hantei = True

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

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

Submission status: Wrong Answer

Solution code:
s = input()
if ('hi' in s):
    if not('hii' in s):
        print('Yes')
        exit()
print('No')

Submission status: Wrong Answer

Solution code:
import re

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys

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')
        sys.exit()

print('Yes')

Submission status: Wrong Answer

Solution code:
S = list(input())
len = len(S)
flag = 1
s = S[0]


for i in range(1, len):
    if s == 'h':
        if S[i] != 'i':
            flag = 0
            break
    if s == 'i':
        if S[i] != 'h':
            flag = 0
            break
    s = S[i]

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

Submission status: Wrong Answer

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

S = input()

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun Mar  8 20:59:57 2020

@author: naoki
"""

string = str(input())

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

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

Submission status: Wrong Answer

Solution code:
import re
s = input()
ans = 'Yes'
s = re.split('(..)', s)[1::]
s = [x for x in s if x != '']
for c in s:
    if c == 'hi': continue
    ans = 'No'
    break
print(ans)

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:
# coding: utf-8
d = {"h":0, "i":0}
S = list(input())
for i in range(len(S)):
    if S[i] != "h":
        if S[i] != "i":
            print("No")
            exit()
        else:
            d["i"] += 1
    else:
        d["h"] += 1
if d["i"] == d["h"]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

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

print(getHi(S))

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:
def main():
	s = input()
	for _ in range(15):
		s=s.replace("hi", " ")
	for _ in range(15):
		s=s.replace(" ", "")
	if s=="":
		print("Yes")
	else:
		print(s,"No")

main()

Submission status: Wrong Answer

Solution code:
n = input()

ans = "No"
if "hi" in n:
    ans = "Yes"
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = input()
ok = True
if len(a) % 2 == 0:
    for i in range(0, len(a)//2 + 1, 2):
        if a[i:i + 2] != "hi":
            ok = False
            break
else:
    for i in range(0, len(a)//2 + 2, 2):
        if a[i:i + 2] != "hi":
            ok = False
            break


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

Submission status: Wrong Answer

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

c = 0

if any(s[i-1]+s[i] == 'hi' for i in range(1,n)):
    c = 1

if c == 0:
    print('No')
elif c == 1:
    print('Yes')

Submission status: Wrong Answer

Solution code:
s = list(input())
for i in range(len(s)-2):
  if s[i]=='h' and s[i+1]=='i' and s[i+2]!='i':
    print('Yes')
    exit()
print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
S=list(input())
flg=True

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

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

Submission status: Wrong Answer

Solution code:
n = str(input())
if n[0]=="h" and n[1]=="i":
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

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:
#!/usr/bin/env python3
import sys

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(S: str):

    if (len(S)%2 != 0)or(len(S)==0):
        print(NO)
    else:
        for x in range(len(S)//2):
            if S[2*x:2*x+2] != "hi":
                print(NO)
                return
    
    print(YES)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    solve(S)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

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


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


print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
flag = False

for i in range(1,5):
    if 'hi' * i == s:
        flag = True

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

Submission status: Wrong Answer

Solution code:
s = list(input())
if s[::2].count('h') == len(s[::2]) and s[1::2].count('i') == len(s[1::2]):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()

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

else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S=str(input())

A= S.count('hi')

if A > 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = str(input())

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

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

Submission status: Wrong Answer

Solution code:
import sys
#input = sys.stdin.readline
S=input()
ans=[]
count =0 
for i in range(len(S)):
    ans.append(S[i])
i=0
while len(ans)>=2:
    if ans[i]+ans[i+1]=="hi":
        ans.pop(0)
        ans.pop(0)
    else:
        print("No")
        exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
S = input()

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

print("Yes")

Submission status: Wrong Answer

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

else:
    flag = False
    for i in range(0, len(s) // 2, 2):
        if s[2 * i: (i+2)] != "hi":
            flag = True
            break
    
    if flag:
        print("No")
    else:
        print("Yes")

Submission status: Wrong Answer

Solution code:
S = input()

Sa = S.split('hi')
Sa = ''.join(Sa)
if len(S) == len(Sa):
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
S = input()
a = S.count("hi")
b = S.count("hii")
if a == 0:
  print("No")
else:
  if a - b > 0:
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()

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

print('Yes')

Submission status: Wrong Answer

Solution code:
import sys
s = list(input())
c = 0
for i in range(len(s)-2):
    if s[i] == "h" and s[i+1] == "i":
        c += 1
    if s[i+1] == "i" and s[i+2] == "i":
        print("No")
        sys.exit()
if c >= 1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import re

S = input()

items = re.split('(..)',S)[1::2]

flg = False

for item in items:
    if item != "hi":
        flg = True

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

Submission status: Wrong Answer

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

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="Yes"
        else:
            ans="No"
            break
    if i%2==1 :
        if s[i]=="i":
            ans="Yes"
        else:
            ans="No"
            break
print(ans)

Submission status: Wrong Answer

Solution code:
S = list(input())
flg = True
for i, s in enumerate(S):
  if i%2 == 0:
    if s != "h":
      flg = False
  else:
    if s != "i":
      flg = False
if flg:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s = input()
a='hi'
b=0
for n in range(5):
	if s==a*n:
		print("Yes")
		b=1
if b!=1:
	print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

    if len(s) == 1:
        print('No')
        return

    for i in range(len(s)):
        if i%2 == 0:
            if not s[i] == "h":
                print('No')
                return
        else:
            if not s[i] == "i":
                print('No')
                return
    
    print('Yes')

main()

Submission status: Wrong Answer

Solution code:
S = input()

flag = True
for i,s in enumerate(S):
    if i%2==1:
        if s != 'i':
            print('No')
            flag = False
            break
    if i%2==0:
        if s != 'h':
            print('No')
            flag = False
            break
if flag == True:
    print('Yes')

Submission status: Wrong Answer

Solution code:
S = input()
l = len(S)
for i in range(l):
  if S[i] == 'h' and i+1 < l:
    if S[i+1] == 'i':
      if i+2 < l:
        if S[i+2] != 'i':
          print('Yes')
          break
      else:
        print('Yes')
        break
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
next_word = 'h'

for word in s:
    if word != next_word:
        print('No')
        exit()
    elif word == next_word:
        if next_word == 'h':
            next_word = 'i'
        elif next_word == 'i':
            next_word = 'h'
print('Yes')

Submission status: Wrong Answer

Solution code:
def solve():
  s=list(input())
  for i in range(len(s)-1):
      if not ((s[i]=='h' and s[i+1]=='i') or (s[i]=='i' and s[i+1]=='h')):
          print("no")
          return
  print("Yes")

solve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def solve():
    s = input()
    return 'Yes' if 'hi' in s and not 'hii' in s else 'No'

print(solve())

Submission status: Wrong Answer

Solution code:
import sys

S = sys.stdin.readline().strip()

for i, s in enumerate(S):
   if i % 2 == 0 and s == "h":
       continue
   elif i % 2 == 1 and s == "i":
       continue
   else:
       print("No")
       sys.exit()

print("Yes")

Submission status: Wrong Answer

Solution code:
def main():
	s = input()
	for _ in range(15):
		s=s.replace("hi", "")
	if s=="":
		print("Yes")
	else:
		print(s,"No")

main()

Submission status: Wrong Answer

Solution code:
s = str(input())

Sample = ["h","hi","hihi","hihihi""hihihihi","hihihihihi"]

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

Submission status: Wrong Answer

Solution code:
#N=int(input())
#N,M=map(int, input().split())
#L=list(map(int, input().split()))
S = str(input())
n = 0
while len(S) > n:
    if n % 2 == 1 and S[n] != 'i':
        print('No')
        exit()
    elif n % 2 == 0 and S[n] != 'h':
        print('No')
        exit()
    n += 1

print('Yes')

Submission status: Wrong Answer

Solution code:
a = input()
b = a.split("hi")
c = "".join(b)
print(c)
if len(c) <= 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys
import os


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

    N = str(sys.stdin.readline().rstrip())
    
    print('Yes' if N[:2] == 'hi' and N[2:3] != 'i' else 'No')


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
# from fractions import gcd
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from functools import reduce
from bisect import bisect_left, insort_left
from heapq import heapify, heappush, heappop

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
MAP = lambda: map(int, INPUT().split())
S_MAP = lambda: map(str, INPUT().split())
LIST = lambda: list(map(int, INPUT().split()))
S_LIST = lambda: list(map(str, INPUT().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


def main():
    S = INPUT()

    for i in range(len(S)//2):
        if S[2*i:2*i+2] != 'hi':
            print("No")
            sys.exit()

    print("Yes")


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
from sys import stdin

def main():

    input = stdin.readline

    S = input()

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import sys
from collections import deque as deq
import re

S = input()

print('Yes' if re.match(r'(hi)+', S) else 'No')

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
s = input()

cnt = 0
for i in range(0, len(s)):
    if s[i:i+2] == 'hi':
        cnt += 1

if cnt == len(s)//2:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys
S = input()

if len(S)<2:
    print("No")
    sys.exit()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
flag = True
S = input()
if len(S) < 2: flag = False
for enum, i in enumerate(S):
    if enum % 2 == 0:
        if i != 'h':
            flag = False
            break
    else:
        if i != 'i':
            flag = False
            break
if flag:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()

if len(S) % 2 ==1:
    out = 'No'

else:
    out='No'
    for i in range(len(S)//2):
        dammy = 'hi' *i
        if dammy == S:
            out = 'Yes'
            break


print(out)

Submission status: Wrong Answer

Solution code:
n = input()

ans = "No"
if n in "hi":
    ans = "Yes"
print(ans)

Submission status: Wrong Answer

Solution code:
S = list(input())

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

print("No")

Submission status: Wrong Answer

Solution code:
import sys
text = input()
flag = 0
for s in text:
    if flag == 0 and s == "h":
        flag = 1
    elif flag ==1 and s == "i":
        flag = 0
    else:
        print("No")
        sys.exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
c = 0
if any(s[i-1]+s[i] == 'hi' for i in range(1,n)):
    c = 1

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

Submission status: Wrong Answer

Solution code:
import math
S=input()

if S.count('hi')>=1:
  if math.ceil(len(S)/2)==S.count('hi'):
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = input()
if "hi" in s:
    for i in s:
        if i == "h" or i == "i":
            continue
        else:
            print("No")
            exit()
    print("Yes")
    exit()
print("No")

Submission status: Wrong Answer

Solution code:
a  = input()
k = a.count('hi')
if len(a)//2 == k:
  print('Yes')
else:
  print('No')