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().split("hi")
flag=False

for i in S:
    if i:
        continue
    else:
        flag=True
if flag:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
str = input()
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:
import re
s = input()
# m = re.fullmatch(hi{1,10},s):
# if m = "None":
#     print("No")
# else:
#     print("Yes")

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

Submission status: Wrong Answer

Solution code:
s = list(input())
ans = 'No'
cnt = 0
#print(s)

for i in range(len(s) -1):
    if s[i] == 'h' and s[i+1] == 'i':
        cnt += 1
    #print(s[i], s[i+1])
if cnt == (len(s)//2):
    ans = 'Yes'
#print(len(s)//2)
#print(cnt)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def solve():
    # N = int(input())
    # N, M = map(int, input().split())
    # A = list(map(int, input().split()))
    S = input()
    # if 'hi' in S:
    #     print('Yes')
    # else:
    #     print('No')

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





if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

Solution code:
string = input()
flag = False

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
s = list(S)
k = []
a = len(s) % 2
if a == 0:
    if s[0] == "h":
        for i in range(a):
            t = [s[i * 2],s[i * 2 + 1]]
            result = ''.join(t)
            k.append(result)
            
        
        #print(k)
        n = 0
        for j in range(a):
            if k[j] == "hi":
                n = n + 1
        if n == a:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
    
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def solve():
  s=list(input())
  if(len(s)<2):
      print("No")
      return
  for i in range(len(s)):
      if (i%2==0 and s[i]!='h'):
          print("No")
          return
      elif(i%2==1 and s[i]!='i'):
          print("No")
          return
  print("Yes")

solve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = list(map(str,input()))
index = 0
if len(S) == 2:
    if S[0] == 'h' and S[1] == 'i':
        index = 1

else:
    for i in range(0, len(S) - 2):
        if S[i] == 'h' and S[i+1] == 'i':
                if S[i+2] == 'i':
                    index = 0
                else:
                    index = 1
                    break

if S[len(S) - 2] == 'h' and S[len(S) - 1] == 'i':
    index = 1


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

Submission status: Wrong Answer

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


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

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

Submission status: Wrong Answer

Solution code:
S = input()

if S.count('h') == S.count('i') and S.count('i') == S.count('hi'):
    print('Yes')
else:
    print('No')

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

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:
# -*- coding: utf-8 -*-

S = str(input())

output = 'No'

if ('hi' in S):
    S = S.replace("hii", "N")

    if ('hi' in S):
        output = 'Yes'

print(output)

Submission status: Wrong Answer

Solution code:
s = input()

a = s.count('hi')

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def solve():
    s = input()
    s = s.replace('hi', '00')
    if len(s) == 1:
        return 'No'
    if len(s) == 2:
        return 'Yes' if s == '00' else 'No'
    # 3以上
    ans = 'No'
    for i in range(len(s)-2):
        if s[i] + s[i+1] == '00' and s[i+2] != 'i':
            ans = 'Yes'
            
    if s[-1] + s[-2] == '00':
        ans = 'Yes'
    
    return ans

print(solve())

Submission status: Wrong Answer

Solution code:
str = input()
str = str.lower()
yes = True
for i in range(len(str)):
  print(i % 2 == 0 and str[i] != 'h', i % 2 == 1 and str[i] != 'i')
  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()
S.replace("hi","")
if S == "":
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
S = input()

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

else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
h=input()

if "hi" in h:
  print("Yes")

else:
  print("No")

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

if 'hi' == s[-2:]:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
ans = "No"
l = [(i+j) for (i,j) in zip(s[::2],s[1::2])]
if "hi" in l and len(set(l)) == 1:
  ans = "Yes"
print(ans)

Submission status: Wrong Answer

Solution code:
a  = input()
import re
k = re.split('(..)',a)[1::2]
result = 'Yes'
for i in range(len(k)):
  if k[i] != 'hi':
    result = 'No'

if a == 'hii':
  print('No')
else:
  print(result)

Submission status: Wrong Answer

Solution code:
import sys

S=input().strip()

if S=="":
  print("No")
  sys.exit()

for i,word in enumerate(S):
  if (i%2==0 and word=="h") or (i%2==1 and word=="i"):
    continue
  else:
    print("No")
    break

else:
  print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = list(input())
for i in range(0, len(S) - 1):
    if 'hi' == (S[i] + S[i + 1]):
        if i + 2 < len(S):
            if S[i + 2] != 'i':
                print('Yes')
                exit()
        else:
            print('Yes')
            exit()
print('No')

Submission status: Wrong Answer

Solution code:
print('YNeos'['hihihihihi'.startswith(input())^1::2])

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

for i in range(10):
  if S[:2] == 'hi':
      S = S[2:]
      print(S)
  else:
    print('No')
    exit()
print('Yes')

Submission status: Wrong Answer

Solution code:
a=input()

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

Submission status: Wrong Answer

Solution code:
# Author: cr4zjh0bp
# Created: Sun Mar  8 12:11:33 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)

i = 0
flag = True
while i < n - 1:
    if s[i] != 'h' or s[i + 1] != 'i':
        flag = False
    i += 2

if n <= 1:
    flag = False
if flag:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s=input()
a=s.find('hii')
b=s.find('ha')
if a==-1:
  if b==-1:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s= input()

flg = 1

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

Submission status: Wrong Answer

Solution code:
S = list(map(str,input()))
index = 0
if len(S) == 2:
    if S[0] == 'h' and S[1] == 'i':
        index = 1

else:
    for i in range(0, len(S) - 2):
        if S[i] == 'h' and S[i+1] == 'i':
                if S[i+2] == 'i':
                    index = 0
                else:
                    index = 1
                    break


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

Submission status: Wrong Answer

Solution code:
s = input()
check = "hi"
if s in check:
  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 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:
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(str, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

S = input()

flag = 0
if len(S) >= 2 and len(S) % 2 == 0:
    for i in range(0, len(S), 2):
        tmp = S[i:i+2]
        if tmp != 'hi':
            flag += 1
            print('No')
else:
    flag += 1
    print('No')

if flag == 0:
    print('Yes')

Submission status: Wrong Answer

Solution code:
a = str(input())

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

Submission status: Wrong Answer

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

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")
    break
  elif i!=len(s)-1:
    continue
  elif i==len(s)-1:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
s = list(S)
k = []
a = len(s) % 2
if a == 0:
    for i in range(a):
        t = [s[i * 2],s[i * 2 + 1]]
        result = ''.join(t)
        k.append(result)
        
    
    #print(k)
    n = 0
    for j in range(a):
        if k[j] == "hi":
            n = n + 1
    if n == a:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
S = input()
a = int(len(S) / 2)
b = S.count("hi")
if a == b:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S=input()
a=0
if len(S)%2==0:
    for i in range(0,len(S)-1,2):
        if (S[i]=="h") and (S[i+1]=="i"):
            a+=1
if a!=int(len(S)/2):
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def solve():
  s=list(input())
  if(len(s)<2):
      print("No")
      return
  for i in range(len(s)):
      if (i%2==0 and s[i]!='h'):
          print("No")
          return
      elif(i%2==1 and s[i]!='i'):
          print("No")
          return
  print("Yes")

solve()

Submission status: Wrong Answer

Solution code:
a = str(input())
b = len(a)
B = int(b/2)
c = 'hi'*B
if a == 'hi':
    print('Yes')
elif b/2 == 1 or b/2 == 2 or b/2 == 3 or b/2 == 4 or b/2 == 5:
    if a == c:
        print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

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":
    ans="Yes"
    #print(i)
    break

print(ans)

Submission status: Wrong Answer

Solution code:
S=str(input())


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = str(input())
S = list(s)
ans = 0

if(len(s) != 2):
    for i in range(len(s)):
        if(S[i] == 'h'):
            if(S[i+1] == 'i'):
                if(S[i+2] == 'i'):
                    ans = 0
                    break
                else:
                    ans = 1
                    break
            else:
                continue
        else:
            continue
else:
    for i in range(len(s)):
        if(S[i] == 'h'):
            if(S[i+1] == 'i'):
                ans = 1
            else:
                continue
        else:
            continue

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

Submission status: Wrong Answer

Solution code:
s = list(input())
flag =True
for i in range(len(s)):
    if i == len(s)-1:
        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:
# -*- coding: utf-8 -*-
mozi = str(input())
if mozi.count('hi') == 0 :
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
s=input()
s=s+"e"
for i in range(len(s)):
    if s[i:i+2]=="hi" and s[i+2]!="i":
        print("Yes")
        break
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:
    pass

else:
  print('No')

Submission status: Wrong Answer

Solution code:
S = input()
a = S.count("hi")
b = S.count("hii")

if a > 0 and b == 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 = input()
r = 'Yes'
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=[str(c) for c in s]
for i in range(len(a)):
    if i%2==1:
        if a[i]!="i":
            print("No")
            exit()
    else:
        if a[i]!="h":
            print("No")
            exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
S = input()
flg = False

num = len(S)
if num == 2 and S == 'hi':
    flg = True
if num == 4 and S == 'hihi':
    flg = True
if num == 6 and S == 'hihihi':
    flg = True
if num == 8 and S == 'hihihi':
    flg = True
if num == 10 and S == 'hihihi':
    flg = True

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

Submission status: Wrong Answer

Solution code:
print('NYoe s'['hihihihihihi'.startswith(input())::2])

Submission status: Wrong Answer

Solution code:
s = input()

if len(s)%2==1:
  print("No")
else:
  
  for i in range(0,len(s)-2,2):
    if not (s[i:i+2] == "hi"):
      print("No")
      exit()
  print("Yes")

Submission status: Wrong Answer

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

if len(s) > 3:
    h = ''.join(s)
    if "hi" in h:
        print("YES")
    else:
        print("NO")
else:
    print("NO")

Submission status: Wrong Answer

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

for i,word in enumerate(S):
  if (i%2==0 and word=="h") or (i%2==1 and word=="i"):
    continue
  else:
    print("No")
    break

else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
def solve():

    S = input()


    for i in range(len(S)):
        if S[i] == 'h':
            if i < len(S) - 1 and S[i+1] == 'i':
                print('Yes')
                break
    else:
        print('No')


if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

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

solve()

Submission status: Wrong Answer

Solution code:
s=input()
n=len(s)
t=set(s)
buf=0
for i in range(1,n):
    if s[i-1]=='h' and s[i]=='i':
        buf+=1
if buf>=1 and n%2==0 and len(t)==2:
    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:
# coding: utf-8
d = {"h":0, "i":0}
S = input()
if len(S) == 1:
    print("No")
    exit()
flag = True
for i in range(len(S)-1):
    if S[i:i+2] != "hi":
        flag = False
        break
print("Yes" if flag else "No")

Submission status: Wrong Answer

Solution code:
S = input()
ans = 'Yes'
for j in range(int(len(S)/2)):
    if S[2*j] == 'h' and S[2*j+1] == 'i':
        continue
    else:
        ans = 'No'
        break
print(ans)

Submission status: Wrong Answer

Solution code:
import re

s = input()

m = re.match(r'(hi)*', s)
if m.group(0):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
chk_str = input()
if chk_str.find('hi')==len(chk_str)/2:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:

letter = input()
 
reve = 0
tr = 0
 
for kk in range(len(letter)):
    if letter[kk] == "i" and reve == 1:
        tr = 1
    elif letter[kk] == "h":
        reve = 1
    else:
        reve = 0
 
if tr == 1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
#At coder 2020/3/8 C
#import math
#import time
S=input()
#Q=int(input())

ans='no'
if len(S)%2==0:
    #print(len(S)/2)
    for ii in range(int(len(S)/2)):
        if S[2*ii]=='h' and S[2*ii+1]=='i':
            ans='Yes'
        else:
            ans='No'
            break

    
print(ans)

Submission status: Wrong Answer

Solution code:
S=str(input())
if "hii" in S:
    print("No")
elif "hia" in S:
    print("No")
elif "hiu" in S:
    print("No")
elif "hie" in S:
    print("No")
elif "hio" in S:
    print("No")
elif "hi" in S:
    print("Yes")
else:print("No")

Submission status: Wrong Answer

Solution code:
import sys
s = str(input())
a = 0
if len(s) == 1:
    print('No')
    sys.exit()
for i in range(len(s) - 1):
    if s[i] == 'h' and s[i + 1] == 'i':
        a += 1
if len(s) % 2 == 0:
    if a == len(s) // 2:
        print('Yes')
else:
     print('No')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
mozi = str(input())
if mozi.find('hi') == -1 :
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(len(x)):
    if x[i] == "h":
        if x[i + 1] == "i":
            y=1
            
            break
    else:
        pass


if y == 1:
    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):
    length = len(S)
    if length % 2 != 0:
        print(NO)
    
    for i in range(length):
        if i % 2 == 0 and S[i] != "h":
            print(NO)
            return
        elif i % 2 != 0 and S[i] != "i":
            print(NO)
            return

    print(YES)

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

n = list(set((s)))
print(n)

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

else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()

def getHi(S):
    if len(S) % 2 == 1:
        return "No"
    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:
S = input()
b = True

for i in range(1, len(S), 2):
	if S[i-1] == 'h':
		if S[i] == 'i':
			continue
	b = False

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

Submission status: Wrong Answer

Solution code:
S = input()
ans = 'No'

if len(S)%2 == 0:
    for i in range(len(S)//2):
        if S[2*i] + S[2*i+1] != 'hi':
            print(i)
            break
        elif i == (len(S)//2)-1:
            ans = 'Yes'
print(ans)

Submission status: Wrong Answer

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

a = 0
for i in range(1, len(s)-1):
  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:
s = str((input()))
s_e = [0] * len(s)

if len(s) == 2:
    if s == "hi":
        print("Yes")
        exit()

for i in range(len(s) - 1):
    if s[i] == "h" and s[i+1] == "i":
        s_e[i] = 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
a = 0
if len(s) == 1:
    print('No')
    exit(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:
print('NYoe s'['hihihihihi'.startswith(input())::2])

Submission status: Wrong Answer

Solution code:
#import sys
#import math
#import numpy as np

'''a,b= map(int,input().split())'''
#a, b, c = [list(map(int, input().split())) for _ in range(3)]
#li0= [int(x) for x in input().split()]
#n,l= map(int, input().split())
#x = [list(map(int, input().split())) for _ in range(n)] 
a=input()
li=list(a)
li.append('y')
ans=0
for i in range(len(a)-1):
  if li[i]=='h' and li[i+1]=='i' and li[i+2]!='i':
    ans+=1
if ans>0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(str, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

S = input()

flag = 0
if len(S) % 2 == 0:
    for i in range(0, len(S), 2):
        tmp = S[i:i+2]
        if tmp != 'hi':
            flag += 1
            print('No')

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

Submission status: Wrong Answer

Solution code:
a = list(map(str, input().split()))
num = len(a)
TorF = True

if num % 2 == 0:
    for i in range(num/2):
        if not a(2*i ) == 'h' and a(2*i + 1) == 'i':
            TorF = False
            break
else:
  TorF = False
  
if TorF == True:
    print('Yes')
else:
    print('No')

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
        else:
            flag = True
            break
if flag:
    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*2] != "h" and S[count*2 + 1] != "i":
            flag = False
            break
        else:
            flag = True

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

Submission status: Wrong Answer

Solution code:
a = input()

if ('hia' == a) or ('hii' == a) or ('hiu' == a) or ('hie' == a) or ('hio' == a):
  print('No')
elif 'hi' in a:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

for i in range(1, n):
    if s[i-1]+s[i] == 'hi':
        print('Yes')
        quit()

print('No')

Submission status: Wrong Answer

Solution code:
string = input()
flag = False

num = len(string)
if num % 2 == 0:
  for i in range(num-2):
    if string[i:i+2] == "hi":
      flag = True

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