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: Accepted

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


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


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

Submission status: Accepted

Solution code:
S = input()
flg = True
while flg and len(S) >= 1:
    flg = (S[:2] == 'hi')
    S = S[2:]
print('Yes' if flg else 'No')

Submission status: Accepted

Solution code:
s=input()
if len(s)&1:
    print('No')
    exit()
for i in list(s[i*2:i*2+2] for i in range(len(s)//2)):
    if i!='hi':
        print('No')
        exit()
print('Yes')

Submission status: Accepted

Solution code:
s=input()
if len(s)%2!=0:
  print("No")
  exit()
for i,c in enumerate(s):
  if (i%2==0 and c=="h") or (i%2==1 and c=="i"):
    continue
  else:
    print("No")
    exit()
print("Yes")

Submission status: Accepted

Solution code:
S=input()
ans='Yes'
i=0
while i<len(S):
    if S[i:i+2]!='hi':
        ans='No'
    i+=2
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
str = input()

s_ans = 'Yes'
if len(str)%2 == 1:
    s_ans ='No'
else:
    for i in range(0,len(str),2):
        moji = str[i:i+2]
        if str[i:i+2] != 'hi':
            s_ans = 'No'
            break
print(s_ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
str = input()

if len(str)%2 == 1:
    print('No')
else:
    for i in range(0,len(str),2):
        moji = str[i:i+2]
        # print(moji)
        if moji != 'hi':
            ans = 1
            break
        else:
            ans = 0
    if ans==1:
        print('No')
    else:
        print('Yes')

Submission status: Accepted

Solution code:
s = input()
k = len(s)
ans = ''
if k % 2 == 1:
  ans = 'No'
else:
  if s == 'hi' * (k // 2):
    ans = 'Yes'
  else:
    ans = 'No'
print(ans)

Submission status: Accepted

Solution code:
import sys, 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, groupby, combinations_with_replacement
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(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

S = input()
print("Yes" if re.fullmatch(r"(hi)+", S) else "No")

Submission status: Accepted

Solution code:
# n, k = map(int, input().split())
# from collections import OrderedDict
# d = OrderedDict()
# a = list(input().split())
# b = list(map(int, input().split()))
# print(r + max(0, 100*(10-n)))
# print("Yes" if 500*n >= k else "No") 
# s = input()
# a = int(input())
# b = int(input())
# c = int(input())
s = input()
print("Yes" if all( i == '' for i in s.split("hi")) else "No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

ans = 'Yes'
num = len(s)

if num % 2 != 0:
  ans = 'No'
  pass
else:
  for i in range(0, num, 2):
    if s[i] + s[i+1] != 'hi':
      ans = 'No' 

print(ans)

Submission status: Accepted

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

f = 0

for i in s:
    if i != "":
        f = 1
        break
    
if f == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
S = list(input())
a = len(S)
b = 0
c = 0
for i in range(a):
  if i%2==0:
    if(S[i] == "h"):
      b+=1
  else:
    if(S[i]=="i"):
      c+=1
if(b+c==a and b==c):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
s = input()
n = len(s)
if n % 2:
    print('No')
    exit()

for i in range(0,n-1,2):
    if s[i:i+2] != 'hi':
        print('No')
        exit()
print('Yes')

Submission status: Accepted

Solution code:
str = input()

if str == "hi"*(len(str)//2):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
s = input();    l = len(s)
if l%2==0:
    a = 'hi'*(l//2)
    if a== s:    print('Yes')
    else:    print('No')
else:    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
if S == "hi"*(len(S)//2):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

a = len(S)
if a%2==1:
  print("No")
  exit()
for i in range(0,a,2):
  if S[i:i+2]!="hi":
    print("No")
    break
  else:
    print("Yes")
    break

Submission status: Accepted

Solution code:
import sys
S = input()
N = len(S)
if N % 2 == 1:
  print('No')
  sys.exit()
for i in range(N//2):
  if S[i*2:(i+1)*2] != 'hi':
    print('No')
    sys.exit()
print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import re
s = input()
bl = re.fullmatch(r"^(hi)+$", s) is not None
print("Yes" if bl else "No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
def is_hitachi(S):
    hitachi = [
        'hi',
        'hihi',
        'hihihi',
        'hihihihi',
        'hihihihihi',
    ]
    if S in hitachi:
        return 'Yes'
    else:
        return 'No'

print(is_hitachi(S))

Submission status: Accepted

Solution code:
import sys
def main():
    s = input()
    if len(s) % 2 == 1:
        print('No')
        sys.exit()
    s1 = s[::2]
    s2 = s[1::2]
    s1t = [c == 'h' for c in s1]
    s2t = [c == 'i' for c in s2]
    if all(s1t) and all(s2t):
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# H, W = [int(_) for _ in input().split()]
import sys
S = input()
if len(S) % 2 == 0:
    hi_list = []
    for i in range(0, len(S), 2):
        hi_list.append(S[i:i+2])
    if set(hi_list) == {'hi'}:
        print('Yes')
        sys.exit(0)
print('No')

Submission status: Accepted

Solution code:
print("YNeos"["".join(input().split("hi"))!=""::2])

Submission status: Accepted

Solution code:
S = input()
l = len(S)
if l % 2 == 0 and S == l // 2 * "hi":
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
S = input()
for i in range(1, 6):
    if S == 'hi' * i:
        print('Yes')
        exit()
print('No')

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
s = input()
if s in ['hi','hihi','hihihi','hihihihi','hihihihihi']:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
s=input()
if s in ['hi','hihi','hihihi','hihihihi','hihihihihi']:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
while len(S) != 0:
  if S[:2] == "hi":
    S = S[2:]
  else:
    break
print("Yes" if len(S) == 0 else "No")

Submission status: Accepted

Solution code:
S = input()

lenS = len(S)
if lenS%2 == 1:
    print('No')
else:
    if all([S[i:i+2] == 'hi' for i in range(0, lenS, 2)]):
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
S=input()
if len(S)%2==1: print('No'); exit()
for i in range(len(S)//2):
    if S[(i*2)]+S[(i*2)+1]!='hi':print('No'); exit()
print('Yes')

Submission status: Accepted

Solution code:
s = input()

if(s == 'hi'):
    print('Yes')
elif(s == 'hihi'):
    print('Yes')
elif(s == 'hihihi'):
    print('Yes')
elif(s == 'hihihihi'):
    print('Yes')
elif(s == 'hihihihihi'):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
s = input()

ans = 'No'
for i in range(5):
    if s == 'hi' * (i + 1):
        ans = 'Yes'
        break
print(ans)

Submission status: Accepted

Solution code:
S = input()
outputString = "No"
if len(S) % 2 !=0:
 outputString="No"
else:
  outputString = "Yes"
  for k,v in enumerate(S):
    if (k % 2 == 0 and v!="h") or (k % 2 == 1 and v!="i"):
       outputString = "No"
       break

print(outputString)

Submission status: Accepted

Solution code:
s = input()

n = len(s)

if n %2 != 0:
    print('No')
elif s == 'hi'*(n//2):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()

s = input()
n = len(s)
if n == s.count("hi")*2:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

if len(S) % 2 == 0 and S == "hi" * (len(S) // 2 ):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
s = input()
hi = 'hi'
for i in range(1, 6):
    if hi * i == s:
        print('Yes')
        break
else:
    print('No')

Submission status: Accepted

Solution code:
a = input()
if a == "hi" * (len(a) // 2):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
import sys

s = list(map(str,input()))

if len(s)%2 == 1:
    print("No")
    sys.exit()

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

print("Yes")

Submission status: Accepted

Solution code:
S = input()
#a,b = map(int,input().split())

ans = "Yes"
if len(S) % 2 == 1:
    ans = "No"

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
hitachi = ""

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

print("No")

Submission status: Accepted

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

if s=="hi" :
    ans="Yes"
if s=="hihi":
    ans="Yes"
if s=="hihihi":
    ans="Yes"
if s=="hihihihi":
    ans="Yes"
if s=="hihihihihi":
    ans="Yes"

print(ans)

Submission status: Accepted

Solution code:
s = input()
if len(s)%2 == 1 or len(s) == 0:
    print("No")
    exit()
while(len(s)):
    # print(s[:2])
    if s[:2] == "hi":
        if len(s) == 2:
            print("Yes")
            exit()
        s = s[2:]
    else:
        print("No")
        exit()
print("No")

Submission status: Accepted

Solution code:
S = input()

hitachi_str = ["hi" * i for i in range(1, 6)]
if S in hitachi_str:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
S = input()
if len(S) % 2 != 0:
    print("No")
    sys.exit()

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

Submission status: Accepted

Solution code:
s = input()
s = s.replace("hi", "")

if s == "":
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
"""
N,X=map(int,input().split())
vA=list(map(int,input().split()))
vA.sort()
"""

S=input().rstrip()
T="hi"

res=any(S==T*i for i in range(1,6))
print("No Yes".split()[res])
#print(res)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
if len(s)%2 == 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: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
ng = True
s = input()
for i in range(1, 6):
    if s=="hi"*i: ng = False
print("YNeos"[ng::2])

Submission status: Accepted

Solution code:
s=input()
ans=""
if len(s)%2==1:
  print("No")
else:
  n=len(s)//2
  ans="hi"*n
  if ans==s:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

if len(S)%2==0 and S=='hi'*(len(S)//2):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

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

Submission status: Accepted

Solution code:
import re
s = input()
if re.sub(r'hi', '', s) == '':
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

for i in range(6):
    if S == "hi" * (i + 1):
        print("Yes")
        exit()

print("No")

Submission status: Accepted

Solution code:
S = input()
if len(S)%2:
    print('No')
    exit()

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

print('Yes')

Submission status: Accepted

Solution code:
from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations # (string,3) 3回
from collections import deque
from collections import defaultdict
import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
S = input()
for i in range(0,len(S),2):
    if S[i:i+2] == 'hi':
        pass
    else:
        print('No')
        exit()
print('Yes')

Submission status: Accepted

Solution code:
s = input()

if len(s) % 2 == 1:
    print("No")
    exit()
while s:
    if s[:2] == "hi":
        s = s[2:]
    else:
        print("No")
        exit()
print("Yes")

Submission status: Accepted

Solution code:
def solve():
    s = input()
    for i in range(1,6):
        if s == "hi"*i:
            print("Yes")
            exit()
    print("No")
    return 0

if __name__ == "__main__":
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
if (len(s)%2==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: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
p = []
for i in range(1,6):
  p.append('hi'*i)
if s in p:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
s = input()
n = len(s)
if n % 2 != 0:
    print("No")
    quit()

for i in range(n//2):
    if s[2*i:(2*i+2)] != "hi":
        print("No")
        quit()
print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
 
ans="No"
if len(s)%2==0:
  if s=="hi"*(len(s)//2):
    ans="Yes"

print(ans)

Submission status: Accepted

Solution code:
S = input()

A = ["hi"*i for i in range(1,6)]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()

ans='Yes'

if len(s)%2==0:
  for i in range(len(s)):
    if i%2==0:
      if s[i]=='h':
        ans='Yes'
      else:
        ans='No'
        break
    else:
      if s[i]=='i':
        ans='Yes'
      else:
        ans='No'
        break
else:
  ans='No'

print(ans)

Submission status: Accepted

Solution code:
S = input()
if S == "hi"*(len(S)//2):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
s = input()
ans = ''
flag = False
for i in range(5):
    ans += 'hi'
    if ans == s:
        flag = True
print('Yes' if flag else 'No')

Submission status: Accepted

Solution code:
S = input()
k = len(S)
if k%2==1:
    print("No")
    exit()

frag = True
for i in range(0,k,2):
    if S[i]+S[i+1]!="hi":
        frag = False

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

if len(s)%2!=0:
    print("No")
else:
    if s.count("hi") == len(s)//2:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

Submission status: Accepted

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


judge=True
if l%2==0:
    for i in range(l//2):
        if not S[2*i:2*(i+1)]=="hi":
            judge=False
    if judge:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Accepted

Solution code:
S = input()
if S == "hi" * (len(S) // 2):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
s = input()
for i in range(1, 10):
  if("hi" * i == s):
    print("Yes")
    exit(0)
print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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


def main():
    S = input()
    if re.match(r'^(?:hi)+$', S):
        print('Yes')
    else:
        print('No')


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
if len(s) % 2 == 0:
	if s == "hi"*(len(s)//2):
		print("Yes")
	else:
		print("No")
else:
	print("No")

Submission status: Accepted

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

S = input()

if S == "hi":
    print('Yes')
elif S == "hihi":
    print('Yes')
elif S == "hihihi":
    print('Yes')
elif S == "hihihihi":
    print('Yes')
elif S == "hihihihihi":
    print('Yes')
else:
    print("No")

Submission status: Accepted

Solution code:
S = str(input())
ans = 'Yes'

from collections import Counter
SC = Counter(list(S))
h,i = 0,0
for a,b in SC.items():
  if a == 'h':
    h = b
  elif a == 'i':
    i = b
  else:
    ans = 'No'
    break

if h == i:
  for i in range(0,len(S)-1,2):
    if S[i]+S[i+1] != 'hi':
      ans = 'No'
      break
else:
  ans = 'No'
  
print(ans)

Submission status: Accepted

Solution code:
def resolve():
    S = input()
    for i in range(0, len(S), 2):
        if not S[i:i + 2] == "hi":
            print("No")
            return
    else:
        print("Yes")


resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input().replace("hi","")

if S == "":
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
from sys import stdin
import math
import re
import queue

input = stdin.readline

MOD = 1000000007
INF = 122337203685477580

def solve():
    str = (input().rstrip())
    str = str.replace("hi","")
    if(len(str) == 0):
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
HiList = []
hi = ""
ans = "No"
for _ in range(5):
    hi += "hi"
    if S == hi:
        ans = "Yes"
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print('YNeos'[input() not in ['hi'*i for i in range(6)]::2])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
## io ##
def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))
## dp ##
def DD2(d1,d2,init=0): return [[init]*d2 for _ in range(d1)]
def DD3(d1,d2,d3,init=0): return [DD2(d2,d3,init) for _ in range(d1)]
## math ##
def to_bin(x: int) -> str: return format(x, 'b') # rev => int(res, 2)
def to_oct(x: int) -> str: return format(x, 'o') # rev => int(res, 8)
def to_hex(x: int) -> str: return format(x, 'x') # rev => int(res, 16)
MOD=10**9+7
def divc(x,y) -> int: return -(-x//y)
def divf(x,y) -> int: return x//y
def gcd(x,y):
    while y: x,y = y,x%y
    return x
def lcm(x,y): return x*y//gcd(x,y)
def enumerate_divs(n):
    """Return a tuple list of divisor of n"""
    return [(i,n//i) for i in range(1,int(n**0.5)+1) if n%i==0]
def get_primes(MAX_NUM=10**3):
    """Return a list of prime numbers n or less"""
    is_prime = [True]*(MAX_NUM+1)
    is_prime[0] = is_prime[1] = False
    for i in range(2, int(MAX_NUM**0.5)+1):
        if not is_prime[i]: continue
        for j in range(i*2, MAX_NUM+1, i):
            is_prime[j] = False
    return [i for i in range(MAX_NUM+1) if is_prime[i]]
## libs ##
from itertools import accumulate as acc
from collections import deque, Counter
from heapq import heapify, heappop, heappush
from bisect import bisect_left
#======================================================#
def main():
    s = IS()
    n = len(s)
    if n%2==1:
        print('No')
        return None
    for i in range(0, n, 2):
        if s[i:i+2] != 'hi':
            print('No')
            return None
    print('Yes')

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import bisect

def solve(s):
    n = len(s)
    if n % 2 == 1:
        return False
    for i in range(0, n, 2):
        if s[i:i+2] != 'hi':
            return False
    return True

def main():
    if solve(input()):
        print('Yes')
    else:
        print('No')

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
S = input()  #文字

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

if len(S) > 0:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
X = input()
l = len(X)
m = l//2
if (X == 'hi'*m):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
s = input()
ans = True if len(s)%2 == 0 else False
for i in range(len(s)//2):
    if i%2 == 1:
        continue
    if s[i:i+2] != "hi":
        ans = False

print("Yes" if ans else "No")

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


def main():
    S = input().rstrip()

    N = len(S)
    if N % 2 == 0:
        is_h = all(s == "h" for s in S[0::2])
        is_i = all(s == "i" for s in S[1::2])
        ans = "Yes" if is_h and is_i else "No"
    else:
        ans = "No"

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

Submission status: Accepted

Solution code:
s = input()

if len(s)%2!=0:
    print('No');exit()
for i in range(0,len(s),2):
    if s[i]=='h' and s[i+1]=='i':
        continue
    else:
        print('No');exit()
print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

hi = ['hi', 'hihi', 'hihihi', 'hihihihi', 'hihihihihi']

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

Submission status: Accepted

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

Submission status: Accepted

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

s=input()

hi="hi"

if len(s)%2==0:
    if s == "hi"*int(len(s)/2):
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Accepted

Solution code:
S = input()

t = 'i'
for l in S:
    if t == 'h' and l == 'i':
        t = 'i'
    elif t == 'i' and l == 'h':
        t = 'h'
    else:
        print('No')
        exit()
            

if t == 'h':
    print('No')
    exit()

print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
for i in range(1,6):
  if s=='hi'*i:
    print('Yes')
    quit()
print('No')

Submission status: Accepted

Solution code:
S = input()
if S.count("hi") == len(S)//2 and len(S)%2==0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
S = input()

if len(S) % 2 != 0:
    print('No')
    exit()

tmp = [S[i:i+2] for i in range(0, len(S), 2)]

for s in tmp:
    if s != 'hi':
        print('No')
        exit()

print('Yes')