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:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

##### リストの 二分木検索 #####
# bisect_left(lists, 3)
# bisect_right(lists, 3)

##### プライオリティキュー #####
# heapq.heapify(a) #リストaのheap化
# heapq.heappush(a,x) #heap化されたリストaに要素xを追加
# heapq.heappop(a) #heap化されたリストaから最小値を削除＆その最小値を出力

# heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう
# heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと

##### タプルリストのソート #####
# sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順
# sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順
# sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順
# sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順

# sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順
# sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順

##### 累乗 #####
# pow(x, y, z) -> x**y % z

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

inf = float('inf')
mod = 1000000007

#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

def main():
	S = input()
	S = S[:-1]

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

	#print(ans)


#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
# special thanks :
#  https://nagiss.hateblo.jp/entry/2019/07/01/185421
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
# nCr mod m
# rがn/2に近いと非常に重くなる
def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res

# mを法とするaの乗法的逆元
def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def egcd(a, b):
    if a == 0:
        return b, 0, 1
    else:
        g, y, x = egcd(b % a, a)
        return g, x - (b // a) * y, y

# nHr mod m
# 問題によって、combination()を切り替えること
def H(n, r, mod=10**9+7):
	# comb = Combination(n+r-1, mod)
	# return comb(n+r-1, r)
    return combination(n+r-1, r, mod)

class Combination:
    """
    O(n)の前計算を1回行うことで，O(1)でnCr mod mを求められる
    n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms)
    使用例：
    comb = Combination(1000000)
    print(comb(5, 3))  # 10
    """
    def __init__(self, n_max, mod=10**9+7):
        self.mod = mod
        self.modinv = self.make_modinv_list(n_max)
        self.fac, self.facinv = self.make_factorial_list(n_max)

    def __call__(self, n, r):
        return self.fac[n] * self.facinv[r] % self.mod * self.facinv[n-r] % self.mod

    def make_factorial_list(self, n):
        # 階乗のリストと階乗のmod逆元のリストを返す O(n)
        # self.make_modinv_list()が先に実行されている必要がある
        fac = [1]
        facinv = [1]
        for i in range(1, n+1):
            fac.append(fac[i-1] * i % self.mod)
            facinv.append(facinv[i-1] * self.modinv[i] % self.mod)
        return fac, facinv

    def make_modinv_list(self, n):
        # 0からnまでのmod逆元のリストを返す O(n)
        modinv = [0] * (n+1)
        modinv[1] = 1
        for i in range(2, n+1):
            modinv[i] = self.mod - self.mod//i * modinv[self.mod%i] % self.mod
        return modinv

if __name__ == "__main__":
	main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys; sys.setrecursionlimit(2147483647); input = sys.stdin.readline
from math import floor, ceil, sqrt, factorial, log
from collections import Counter, defaultdict, deque
from operator import itemgetter
INF = float('inf'); MOD = 10**9+7
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(MI())
def LIR(n): return [LI() for i in range(n)]
def IS(): return input().rstrip()

def main():
    S = IS()
    if 'hi' in S:
        print('Yes')
    else: print('No')

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
 
import math
import itertools
import sys
import copy
#import numpy as np
 
# 入力
#A, B, C, D = map(int, input().split())
#L = list(map(int, input().split()))
#S = list(str(input()))
#N = int(input())
#S = str(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#def main(S, b):

if __name__ == '__main__':
    s = input()
    if ("hi" in s):
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    from sys import stdin
    input = stdin.readline

    s = input()[:-1]
    if 'hi' in s:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

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

if 'hi' in S:
    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:
from sys import exit

s = 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:
S=raw_input()
if "hi" in S:
    print "Yes"
else:
    print "No"

Submission status: Wrong Answer

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

S = input().strip()

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

Submission status: Wrong Answer

Solution code:
import sys
from collections import deque


def input():
    return sys.stdin.readline()[:-1]


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


if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

Solution code:
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate
import sys
import bisect
import string
import math
import time


def I(): return int(input())


def S(): return input()


def MI(): return map(int, input().split())


def MS(): return map(str, input().split())


def LI(): return [int(i) for i in input().split()]


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


def input(): return sys.stdin.readline().rstrip()


def print_matrix(mat):
    for i in range(len(mat)):
        print(*mat)


def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end)


YNL = {False: 'No', True: 'Yes'}
YNU = {False: 'NO', True: 'YES'}
MOD = 10**9+7
inf = float('inf')
IINF = 10**10
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']

show_flg = False
# show_flg = True


def main():
    s = S()

    for i in range(len(s)-1):
        if s[i] == 'h' and s[i+1] == 'i':
            print('Yes')
            return

    print('No')


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
S = input()

print("Yes" if S.find("hi") != -1 else "No")

Submission status: Wrong Answer

Solution code:
import sys
import math
import collections
from collections import deque
#n = int(input())
#a, b = map(int, sys.stdin.readline().split())
s = input()
#x = sys.stdin.readline().split()

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

print("No")

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10 ** 7)

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

S = input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(solve())

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

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

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
s = str(input())
if 'hi' in s:
  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()

cnt = S.count("hi")
if cnt:
    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:
s=input()
for i in range(5):
    if s=="hi"*i:
        print("Yes")
        break
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()

if S.count('hi') >= 1:
    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:
s = 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:
import sys
input = sys.stdin.readline

S=input().strip()

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

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import collections

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

S = str(input())

if "hi" in S:
    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:
s = raw_input()
print 'Yes' if 'hi' in s else 'No'

Submission status: Wrong Answer

Solution code:
from itertools import accumulate, permutations, combinations, product, combinations_with_replacement, groupby
from math import sqrt, factorial, log
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from heapq import heappop, heappush, heappushpop
import sys
stdin = sys.stdin
mod = 10**9 + 7

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

s = ns()
if "hi" in s:
    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:
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float("inf")


def main():
    S = input()[:-1]
    if "hi" in S:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# coding: utf-8
S = list(set(input()))
if "h" in S and "i" in S:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys, math
def input():
    return sys.stdin.readline()[:-1]
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial
from bisect import bisect_left #bisect_left(list, value)
#from fractions import gcd
enu = enumerate

sys.setrecursionlimit(10**7)
S = input()

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

Submission status: Wrong Answer

Solution code:
s = input()
for i in range(len(s)):
    if s[i:i+2] == 'hi':
        print("Yes")
        exit()
print("No")

Submission status: Wrong Answer

Solution code:
import bisect
import cmath
import heapq
import itertools
import math
import operator
import os
import random
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

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

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353


S = sys.stdin.buffer.readline().decode().rstrip()
ok=False
for i in range(5):
    ok  |= S == 'hi' * i
if ok:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def 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')


if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False
"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""
s = input().split()[0]

if s.count("hi"):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

s = ns()
n = len(s)
flag = False
for i in range(n - 1):
    if s[i] == 'h' and s[i + 1] == 'i':
        flag = True

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

Submission status: Wrong Answer

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

import sys
from collections import Counter

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

if S.count('hi'):
    Yes()
else:
    No()

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
S = input()
if 'hi' in S:print('Yes')
else: print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!python3

iim = lambda: map(int, input().rstrip().split())

def resolve():
    s = input()
    print("Yes" if "hi" in s else "No")

if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
cnt = s.count('hi')
if cnt > 0:
    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:
s=input()
if s.count('hi')>=1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    S = input().strip()
    if S.count("hi") > 0:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
if(input()=="hitachi"):
    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:
s = input()
if "hi" in s:
	print("Yes")
else:
	print("No")

Submission status: Wrong Answer

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

s = readline().rstrip().decode('utf-8')

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

Submission status: Wrong Answer

Solution code:

# じょえチャンネルおもしろいよ～～～
# https://www.youtube.com/channel/UCRXsI3FL_kvaVL9zoolBfbQ

Hitachi="Hitachi"
hitachi="hitachi"

s=input()
if "hihi" in s:print("Yes")
else:print("No")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
S = input()
word = 'hi'
if word in S:
    while 1:
        if word == S:
            print('Yes')
            break
        else:
            word += 'hi'
else:
    print('No')

Submission status: Time Limit Exceeded

Solution code:
s=input()
n=len(s)
if n%2==1:
  print("No")
  exit()
while 1==1:
  if s[:2]=="hi":
    s=s[2:]
  elif len(s)==0:
    print("Yes")
    exit()
  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")
      exit()
  print("Yes")
else:
  print("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 = list(input())

out = 0

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
x = ["hi", "hihi", "hihihi", "hihihihi", "hihihihihi"]
if s in x:
  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:
from sys import stdin
input = lambda: stdin.readline().rstrip()
s = input()
if len(s) % 2 == 1:
    print("No")
    exit()
ans = "Yes"
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:
S=input()

Slist=list(S)

flag=True

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

Submission status: Accepted

Solution code:
print('YNeos'[1-(input()in['hi'*i for i in range(11)])::2])

Submission status: Accepted

Solution code:
s = input()

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

  print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
def input():
    return sys.stdin.readline()[:-1]

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

while s:
    if s[0]=="h" and s[1] == "i":
        s.pop(0)
        s.pop(0)
    else:
        print("No")
        exit()

print("Yes")

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 ()
S = S.replace('hi', '')
if len (S) == 0:
  print ('Yes')
else:
  print ('No')

Submission status: Accepted

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


if __name__ == "__main__":
    main()

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()
L = s.split("hi")
ans = 1
for x in L:
    if x != "":
        ans = 0
print(["No","Yes"][ans])

Submission status: Accepted

Solution code:
s = input()

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

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
'''
Created on 2020/08/20

@author: harurun
'''
def main():
  import re
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write

  S=pin()[:-1]
  if re.fullmatch(r"(hi)+",S)==None:
    print("No")
    return 
  print("Yes")
  return 

main()

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rf = lambda: map(float, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()

result = 'No'

if len(s) % 2 == 0:
   result = 'Yes'
   for i in range(int(len(s) / 2)):
      if s[i*2:i*2+2] != 'hi':
         result = 'No'
         break

print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
c=["hi"*int(i) for i in range(1,6)]
if s in c:
    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()
if len(s) % 2 == 1:
  print("No")
  exit()

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

Submission status: Accepted

Solution code:
S=input()
n=len(S)
print("Yes" if S=="hi"*(n//2) 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:
n = input()
if n == "hi" or n == "hihi" or n == "hihihi" or n == "hihihihi" or n == "hihihihihi":
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
S = input()

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

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

Submission status: Accepted

Solution code:
S = input()

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

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

print("Yes")

Submission status: Accepted

Solution code:
import sys, math
from functools import lru_cache
from collections import deque
sys.setrecursionlimit(500000)
MOD = 10**9+7

def input():
    return sys.stdin.readline()[:-1]

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]


def main():
    S = input()
    for i in range(1, 6):
        if S == 'hi'*i:
            print('Yes')
            return
    print('No')


if __name__ == '__main__':
    main()

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 s.replace('hi', '') == '':
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import sys
import bisect
readline = sys.stdin.readline


def main():
    s = readline().rstrip()
    print('Yes' if s == 'hi' or s == 'hihi' or s == 'hihihi'or s ==
          'hihihihi' or s == 'hihihihihi' else 'No')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()

l = ['hi', 'hihi', 'hihihi', 'hihihihi', 'hihihihihi']
if s in l:
  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)-1, 2):
    if s[i] + s[i+1] != "hi":
        print("No")
        exit()

print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
t = ""
D = set([])
for _ in range(5):
    t += "hi"
    D.add(t)
print("Yes" if input() in D else "No")

Submission status: Accepted

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

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

Submission status: Accepted

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