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:
s = input()
isHitachi = False
for i in range(1, 6):
    if s == 'hi'*i:
        isHitachi = True
        break
if isHitachi:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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


# mod=10**9+7
# rstrip().decode('utf-8')
# map(int,input().split())
# import numpy as np

def main():
	s=input()
	ans="No"
	if s in ["hi","hihi","hihihi","hihihihi","hihihihihi"]:
		ans="Yes"
	print(ans)

if __name__ == "__main__":
	main()

Submission status: Accepted

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

for s in S:
    if s != '*':
        print('No')
        exit()

print('Yes')

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
s=input()
x=""
for i in range(6):
    if x==s:
        print("Yes")
        exit()
    x+="hi"
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:
import sys
c = input()
for i in range(6):
    if c == "hi"*i:
        print("Yes")
        sys.exit()
print("No")

Submission status: Accepted

Solution code:
# n = int(input())
# a, b = map(str, input().split())
# a = list(map(str, input().split()))
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)
n1=0
n2=0
for i in range(N):
 if (i%2==0)and(S[i]=="h"):
  n1=n1+1
 if (i%2==1)and(S[i]=="i"):
  n2=n2+1

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import re
print("Yes") if re.fullmatch(r'(hi)+',input()) else print("No")

Submission status: Accepted

Solution code:
S=input()

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

Submission status: Accepted

Solution code:
S = input()
res = 'No'
if len(S) % 2 == 0 and len(S) > 0:
    res = 'Yes'
    for i in range(int(len(S)/2)):
        # print(S[i*2:i*2+2])
        if S[i*2:i*2+2] != 'hi':
            res = 'No'
            break
print(res)

Submission status: Accepted

Solution code:
s = str(input())

l = len(s)

ans = 'No'

if l % 2 == 0 and 'hi'*(l//2) == s:
    ans = 'Yes'

print(ans)

Submission status: Accepted

Solution code:
S = input()
res = 'No'
if len(S) % 2 == 0 and len(S) > 0:
    res = 'Yes'
    for i in range(int(len(S)/2)):
        # print(S[i*2:i*2+2])
        if S[i*2:i*2+2] != 'hi':
            res = 'No'
            break
print(res)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
b = True
for c in s:
    if b:
        b = False
        if c != 'h':
            break
    else:
        if c == 'i':
            b = True
        else:
            break
print("Yes" if b else "No")

Submission status: Accepted

Solution code:
import re

s = str(input())
flag = True

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

Submission status: Accepted

Solution code:
def a_hitachi_string():
    S = input()
    return 'Yes' if S == 'hi' * (len(S) // 2) else 'No'

print(a_hitachi_string())

Submission status: Accepted

Solution code:
S = input()

if S == ''.join(['hi'] * (len(S) // 2)):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
S = input()
S_list = []
a = 'hi'
A = ''
for i in range(5):
  A = A + a
  S_list.append(A)

if S in S_list:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    s = ''.join(input().split("hi"))
    print("No" if len(s) > 0 else "Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def func(s : str) -> str:
    if len(s) % 2: 
        return "No"
    for i in range(len(s)):
        if s[i] != "hi"[i % 2]:
            return "No"
    return "Yes"

s = input()
print(func(s))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import re
S = str(input())
res = re.sub("hi","", S)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print('Yes' if input() in ['hi'*i for i in range(1,11)] else 'No')

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 S.count('hi') *2 == len(S):
    print('Yes')
else :
    print('No')

Submission status: Accepted

Solution code:
print("YNeos"[input().replace("hi","")>""::2])

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

def main():
    arg = input()
    if arg in ['hi'*i for i in range(1,6)]:
        print('Yes')
    else:
        print('No')

if __name__=='__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

if len(s)%2 == 0:
    x = len(s)//2
    if "hi"*x == s:
        print("Yes")
    else:
        print("No")
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:
import math
import string


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


#a, b, m = map(int, input().split())
#aa = readints()
#bb = readints()
#print(a, b, m)
# print(aa)
# print(bb)
# for i in range(m):
#    xyc = readints()
#    print(xyc)

s = input()
if s == 'hi':
    print("Yes")
    exit()
if s == 'hihi':
    print("Yes")
    exit()
if s == 'hihihi':
    print("Yes")
    exit()
if s == 'hihihihi':
    print("Yes")
    exit()
if s == 'hihihihihi':
    print("Yes")
    exit()
print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A - Hitachi String
def main():
    S = input().rstrip()
    print("Yes" if S in {"hi", "hihi", "hihihi", "hihihihi", "hihihihihi"} else "No")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
S = input()
S_len = len(S)
if S_len % 2 != 0:
    print("No")
else:
    set_num = int(S_len // 2)
    for i in range(set_num):
        if S[i*2] != "h" or S[i*2 +1] != "i":
            hitachi = False
            break
        else:
            hitachi = True
    if hitachi == False:
        print("No")
    elif hitachi  == True:
        print("Yes")

Submission status: Accepted

Solution code:
s = list(input())

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

for i in range(len(s) // 2):
    if s[i*2] == 'h' and s[i*2+1] == 'i':
        continue
    print('No')
    exit()

print('Yes')

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==0):
  for i in range(len(S)//2):
    if(S[2*i]!="h" or S[2*i+1]!="i"):
      print("No")
      break
  else:
    print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
S=input()
ans=''
for i in range(5):
    ans+='hi'
    if(S==ans):
        print("Yes")
        exit()
print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
if len(s)%2==0:
    if 'hi'*(len(s)//2)==s:
        print('Yes')
    else:
        print('No')
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:
def hitachi(input_s: str):
    length = len(input_s)
    if length % 2 != 0:
        return 'No'
    else:
        for i in range(1,length // 2 + 1):
            if input_s[2*i-2:2*i] != 'hi':
                return 'No'
        return 'Yes'

if __name__ == "__main__":
    S = input()
    print(hitachi(S))

Submission status: Accepted

Solution code:
s = input()

if len(s) % 2 != 0:
	print("No")
	exit()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
def check(s):
    l  = len(s)
    if l%2 != 0:
        return "No"
    else:
        r =  int(l/2)
        for i in range(r):
            a = s[2*i]
            b = s[2*i+1]
            if a == "h" and b == "i":
                pass
            else:
                return "No"
        return 'Yes'
print(check(s))

Submission status: Accepted

Solution code:
S=str(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

flag = 0

while flag==0 and len(s)!=0 :
    if s.endswith('hi'):
        s = s[0:len(s)-2]
    else:
        flag = 1
#    print(s)
#    print(len(s))

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

Submission status: Accepted

Solution code:
S=input()

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

Submission status: Accepted

Solution code:
S = input()

T = "No"
s = ""
for _ in range(5):
    s += "hi"
    if S == s:
        T = "Yes"
print(T)

Submission status: Accepted

Solution code:
print(input().replace('hi','')and'No'or'Yes')

Submission status: Accepted

Solution code:
s=input();print('YNeos'[len(s)>s.count('hi')*2::2])

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

Submission status: Accepted

Solution code:
S=input()
n=len(S)
if n&1:
  print("No")
  exit()

T="hi"*(n//2)
print("Yes" if S==T else "No")

Submission status: Accepted

Solution code:
import re

str = input()

if re.fullmatch(r'(hi)+', str):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import re
s = input()

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

Submission status: Accepted

Solution code:
n = input()
s = "hi"
l = [ s*i for i in range(1,11)]

if n in l:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
s = input().rstrip()
h = ['hi' * i for i in range(1,6)]

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

Submission status: Accepted

Solution code:
S=input()
N=len(S)
i=0
while i<N:
  if S[i:i+2]=='hi':
    i+=2
  else:
    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()
p=s.count("hi")
if p==len(s)//2 and len(s)%2==0:
  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 sys
readline = sys.stdin.buffer.readline

S = readline().strip().decode('utf-8')
N = len(S)
ans = 'No'
if N%2 == 0:
    for i in range(N//2):
        if S[2*i] != 'h' or S[2*i+1] != 'i':
            break
        
    else:
        ans = 'Yes'

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
str = input()

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

Submission status: Accepted

Solution code:
def main():
    S = list(input())
    k = 0
    ans = False
    
    while True :
        if len(S) % 2 != 0 :
            break 
        elif k == len(S):
            ans = True
            break
        elif S[k] + S[ k + 1] != "hi":
            break
        else :
            k += 2
    if ans : print("Yes")
    else: print("No")
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
s=input()
l=[]
for i in range(0,len(s),2):
    l.append(s[i:i+2])
    
count = 0
for i in l:
    if i != 'hi':
        print('No')
        sys.exit()

print('Yes')

Submission status: Accepted

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

Submission status: Accepted

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

import sys
import re

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

S = input()
N = len(S)

if re.match(r'^(hi)+$', S):
    Yes()
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()
n=len(s)
if n%2: print("No")
elif s == "hi"*(n//2): print("Yes")
else: print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
hitachi = ["hi" * (i+1) for i in range(5)]
# => ['hi', 'hihi', 'hihihi', 'hihihihi', 'hihihihihi']
print("Yes" if s in hitachi else "No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=str(input())
n=len(s)
ans=1
if n%2==1:
    ans=0

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

Submission status: Accepted

Solution code:
print(("No","Yes")[input().replace("hi","")==""])

Submission status: Accepted

Solution code:
S=input()
if len(S)%2==1:
    print('No')
else:
    n=len(S)//2
    x=''
    for i in range(0,n):
        x+='hi'
    if x==S:
        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:
from sys import stdin

s = stdin.readline().rstrip()

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

Submission status: Accepted

Solution code:
S = str(input())
hitati = ["hi","hihi","hihihi","hihihihi","hihihihihi"]

if S in hitati:
    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:
import sys 
s = input().strip()
for i in range(1, 10):
  if s == ("hi" * i):
    print("Yes")
    sys.exit()
    
print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

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()
i = 1
ans = 'No'

while i <= 5:
    T = 'hi' * i
    if T == S:
        ans = 'Yes'
        break
    else:
        i += 1

print(ans)

Submission status: Accepted

Solution code:
print("Yes" if input() in ["hi"*i for i in range(1,6)] else "No")

Submission status: Accepted

Solution code:
s=input()

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

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

Submission status: Accepted

Solution code:
s=input();l=['hi'*i for i in range(1,6)]
print("NYoe s"[s in l::2])

Submission status: Accepted

Solution code:
S = input().strip()
target = S
if target == 'hi':
    print('Yes')
elif target == 'hihi':
    print('Yes')
elif target == 'hihihi':
    print('Yes')    
elif target == 'hihihihi':
    print('Yes')
elif target == 'hihihihihi':
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
last = 'i'

if len(S) == 1:
    print("No")
    exit()

for c in S:
    if (last == 'i' and c != 'h') or (last == 'h' and c != 'i'):
        print("No")
        exit()
    last = c
if last != "i":
    print("No")
    exit()
print("Yes")
exit()

Submission status: Accepted

Solution code:
s = input()
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'
      break
  else:
    if s[i] != 'i':
      ans = 'No'
      break
print(ans)

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

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 == 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:
a = input()
b = 'hi'
c = 'hihi'
d = 'hihihi'
e = 'hihihihi'
f = 'hihihihihi'

if (a == b) or (a == c) or (a == d) or (a == e) or (a == f):
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

S=input()

ans=S.count("hi")

if 2*ans==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(0,len(s),2):
    if s[i]+s[i+1]!="hi":
        print("No")
        exit()
print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print('YNeos'[input().replace('hi','')>''::2])

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

input = input()
hitati = [ 'hi'*i for i in range(1, 6) ]
if input in hitati:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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



if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
s = input()
 
l = len(s)
 
if l % 2 != 0:
    print("No")
else:
    for i in range(0, l, 2):
        if s[i:i+2] == "hi":
            if i == l-2:
                print("Yes") 
            else:
                continue

        else:
            print("No")
            break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main(S):
    s = ''
    for i in range(5):
        s += 'hi'

        if s == S:
            print('Yes')
            return
    print('No')    

S = input()
main(S)

Submission status: Accepted

Solution code:
s = input()

ans = "No"
if s == "hi" or s == "hihi" or s == "hihihi" or s == "hihihihi" or s == "hihihihihi":
    ans="Yes"
print(ans)

Submission status: Accepted

Solution code:
l=input().split("hi")
s="".join(l)
if s=="":
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

S = input().strip()

l = len(S)

if S == 'hi'*(l//2):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
if len(s) % 2 != 0:
    print('No')
    quit()
for i in range(int(len(s)/2)):
    if s[i * 2:i * 2 + 2] != 'hi':
        print('No')
        quit()
print('Yes')

Submission status: Accepted

Solution code:
"""
A
"""
import sys

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