Problem:


Score : 100 points

Problem Statement

A Hitachi string is a concatenation of one or more copies of the string hi.

For example, hi and hihi are Hitachi strings, while ha and hii are not.

Given a string S, determine whether S is a Hitachi string.

Constraints

The length of S is between 1 and 10 (inclusive).

S is a string consisting of lowercase English letters.

Input

Input is given from Standard Input in the following format:

S

Output

If S is a Hitachi string, print Yes; otherwise, print No.

Sample Input 1

hihi

Sample Output 1

Yes

hihi is the concatenation of two copies of hi, so it is a Hitachi string.

Sample Input 2

hi

Sample Output 2

Yes

Sample Input 3

ha

Sample Output 3

No



Sample input:
hihi


Sample output:
Yes

Submission status: Wrong Answer

Solution code:
S=input()

pre=S[0]

ans='Yes'

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
# print("S:", S)
for i in S:
    if S[:2] != 'hi':
        print('No')
        exit()
    S = S[2:]
    # print(":", S[:2])
print('Yes')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np
import fractions

s=str(input())
for i in range(len(s)-1):
    if(i%2==0):
        if(s[i]!='h' or s[i+1]!='i'):
            print("No")
            exit(0)
    if(s[i]!='h' and s[i]!='i'):
        print("No")
        exit(0)
if(s[len(s)-1]!='h' and s[len(s)-1]!='i'):
    print("No")
    exit(0)

print("Yes")

Submission status: Wrong Answer

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

s = input()

fl = True
for i in range(len(s)):
    if i % 2 == 0:
        if s[i] != 'h':
            fl = False
    else:
        if s[i] != 'i':
            fl = False

if fl:
    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')
n = len(s)

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

Submission status: Wrong Answer

Solution code:
def main():

    S = input()
    L_S = len(S)

    if L_S % 2 != 0:
        print('No')

    for i in range(L_S//2):
        if S[i*2] != 'h' or S[i*2 + 1] != 'i':
            print('No')
            exit()
    print('Yes')


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
s = input()

flag = False
if s[0]=="h":
  if s[1]=="i":
    flag = True
    
if flag==True:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
a = "hi"
s = input()
n = 0
for i in range(5):
    if a*i==s:
        n = n+1
    else:
        pass
if n>=1:
    print("Yes")
else:
        print("No")

Submission status: Wrong Answer

Solution code:
s = input()
t =0 
for s in s:
  if s == "h":
    t=1
  elif s =="i":
    if t == 0:
      t = 0
      print("No")
      quit()
  else:
    print("No")
    quit()
if t == 1:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

Solution code:
S = input()

if len(S) < 2:
    print('No')
    exit()

for i, s in enumerate(S):
    if i % 2 == 0:
        if s == 'h':
            continue
        else:
            break
    else:
        if s == 'i':
            continue
        else:
            break
else:
    ans = 'Yes'
    print(ans)
    exit()
print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
s=input()

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

Submission status: Wrong Answer

Solution code:
s=input()
cnt=0
ans="No"
for i in range(len(s)-1):
  if s[i]=="h" and s[i+1]=="i":
    ans="Yes"
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = str(input())

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

print(ans)

Submission status: Wrong Answer

Solution code:
S = input()

now = 0
hi = ["h", "i"]
for s in S:
    if hi[now] != s:
        print("No")
        exit(0)

    if now == 0:
        now = 1
    else:
        now = 0

print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

s = input()

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


print('Yes')

Submission status: Wrong Answer

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

# print(lens)
if (lens <= 2 or lens % 2 == 1):
    print("No")
    exit(0)

for i in range(0, lens, 2):
    if (not (s[i] == 'h' and s[i + 1] == 'i')):
        print("No")
        exit(0)
print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
HITACHI = "hi"
is_hitachi = True

for i in range(len(S)//2):
  if S[2*i:2*i+2] != HITACHI:
    is_hitachi = False
    break

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = str(input())

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

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

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
import sys

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7


S = input()
for i, c in enumerate(S):
    if i % 2 == 0 and c != 'h':
        print('No')
        exit(0)
    if i % 2 != 0 and c != 'i':
        print('No')
        exit(0)
print('Yes')

Submission status: Wrong Answer

Solution code:
s = input()
if len(s) < 2:
    print("No")
else:
    for i, s in enumerate(s):
        if i % 2:
            if s != "i":
                print("No")
                break
        else:
            if s != "h":
                print("No")
                break
    else:
        print("Yes")

Submission status: Wrong Answer

Solution code:
S = str(input())
l = len(S)
k = 0
for i in range (l - 1):
    if S[i] == "h":
        if S [i + 1] == "i":
            k = 1
if k == 0:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
s = list(input())
c = 0
ans = 0
if len(s) == 1 and s[0] == "h":
    print("No")
else:
    for i in range(len(s)):
        if s[i] == "h" and c == 0:
            c = 1
            ans += 1
        elif s[i] == "i" and c == 1:
            c = 0
            ans += 1

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
# coding: utf-8
import sys
sys.setrecursionlimit(200000000)


# my functions here!

#入力
import sys
input = sys.stdin.readline
def pin(type=int):
    return map(type,input().rstrip().split())

def resolve():
    N=input()
    if len(N)%2==0:
        t=len(N)//2
        temp=""
        for i in range(t):
            temp+="hi"
            
        if temp==N:
            print("No")
            return
    print("Yes")
    #print([["NA","YYMM"],["MMYY","AMBIGUOUS"]][cMMYY][cYYMM])
#if __name__=="__main__":resolve()

"""
#printデバッグ消した？
#前の問題の結果見てないのに次の問題に行くの？
"""
"""
お前カッコ閉じるの忘れてるだろ
"""
import sys
from io import StringIO
import unittest

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """hihi"""
        output = """Yes"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """hi"""
        output = """Yes"""
        self.assertIO(input, output)
    def test_入力例_3(self):
        input = """ha"""
        output = """No"""
        self.assertIO(input, output)

if __name__=="__main__":resolve()

Submission status: Wrong Answer

Solution code:
s = input()
l = s[0::2]
m = s[1::2]
if set(l) == {'h'} and set(m) == {'i'}:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = list(input())
ans = 0
for i in range(len(s)):
    if s[i] == "h" and s[i+1] == "i":
        ans = 1
        break
if ans == 0:
    print("No")
elif ans == 1:
    print("Yes")

Submission status: Wrong Answer

Solution code:
from collections import defaultdict
from collections import deque
from string import ascii_uppercase
import sys, bisect, math, heapq

stdin = sys.stdin
read_int = lambda : list(map(int,stdin.readline().split()))
read_str = lambda : stdin.readline().rstrip()

S = read_str()

def solve():
    if len(S) < 2:
        return 'No'
    for i, s in enumerate(S):
        if i % 2 == 0:
            if s != 'h': return 'No'
        else:
            if s != 'i': return 'No'
    return 'Yes'

if __name__ == "__main__":
    print(solve())

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()
List = list(S)
ans = 1
h = 0

for i in range(len(List)):
  a = List[i]
  if a == "h":
    h = 1
  elif h == 1 and a == "i":
    h = 0
  else:
    ans = 0

if ans == 1 and S != "h":
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S=str(input())

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

Submission status: Wrong Answer

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

S = readline().strip()
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: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
H = True
ans = True
for c in input():
    if H and c != "h":
        ans = False
        break
    elif not H and c != "i":
        ans = False
        break
    H = not H

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

Submission status: Wrong Answer

Solution code:
s = input()

if len(s) > 1:
    ans = True
else:
    ans = False

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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


def solve(S: str):

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


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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
s = input()
if "hi" in s:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
s = input()
flag = 1
for i in range(0, len(s)-1):
  if(s[i] == "h" and s[i+1] != "i"):
    flag = 0
  elif(s[i] == "i" and s[i+1] != "h"):
    flag =0
if(flag == 0):
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

if len(s)%2 != 0:
    print('No')
else:
    for x in range(0,len(s), 2):
        if s[x:x+2] != 'hi':
            print('No')
            exit()
print('Yes')

Submission status: Wrong Answer

Solution code:
s=input()
n=len(s)
buf=0
for i in range(1,n):
    if s[i-1]=='h' and s[i]=='i':
        buf+=1
if buf>=1 and n%2==0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()

if len(S)<=10 and len(S)>=1:
    if "hi" in S:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
s = input()
p = len(s)
s = s.replace('hihi', '')
a = len(s)
if p -a>= 4:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

s = input()

if len(s) == 1:
  print('No')
  sys.exit()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

flag = True
for i in range(len(s)):
    if i%2 == 0:
        if s[i] != "h":
            flag =False
            break
    else:
        if s[i] != "i":
            flag = False
            break

if len(s) == 1:
    flag=False

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
# coding: utf-8
import sys
sys.setrecursionlimit(200000000)


# my functions here!

#入力
import sys
input = sys.stdin.readline
def pin(type=int):
    return map(type,input().rstrip().split())

def resolve():
    N=input()
    if len(N)%2==0:
        t=len(N)//2
        temp=""
        for i in range(t):
            temp+="hi"
            
        if temp==N:
            print("No")
            return
    print("Yes")
    #print([["NA","YYMM"],["MMYY","AMBIGUOUS"]][cMMYY][cYYMM])
#if __name__=="__main__":resolve()

"""
#printデバッグ消した？
#前の問題の結果見てないのに次の問題に行くの？
"""
"""
お前カッコ閉じるの忘れてるだろ
"""
import sys
from io import StringIO
import unittest

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """hihi"""
        output = """Yes"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """hi"""
        output = """Yes"""
        self.assertIO(input, output)
    def test_入力例_3(self):
        input = """ha"""
        output = """No"""
        self.assertIO(input, output)

Submission status: Wrong Answer

Solution code:
def main():
 S = str(input())

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

if __name__ == "__main__":
  main()

Submission status: Wrong Answer

Solution code:
S=input()
flag=True
count=0
for i in S:
    if i=="h"and(count==0):
        count=1
    elif i=="i"and(count==1):
        count=0
    else:
        flag=False
if flag:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
# Code for A - Hitachi String
# Use input() to fetch data from STDIN
s = input()
def solve():
    for i, x in enumerate(s):
        if i % 2 == 0 and not x == "h":
            print("No")
            return
        if i % 2 == 1 and not x == "i":
            print("No")
            return

    print("Yes")

solve()

Submission status: Wrong Answer

Solution code:
import sys
sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
def resolve():
    S = sr()
    for i in range(len(S)):
        if (i%2 == 0 and S[i] == 'h') or (i%2 == 1 and S[i] == 'i'):
            continue
        print('No')
        return
    print('Yes')
resolve()

Submission status: Wrong Answer

Solution code:
import sys
#input = sys.stdin.readline
S=input()
ans=[]
count =0 
for i in range(len(S)):
    ans.append(S[i])
if not "h" in S or not "i" in S:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
s = input()

v = 'hi'

flg = True

while True:
  if len(s) <= 1:
    break
  if s[:2] != v:
    flg = False
    break
  else:
    s = s[2:]

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

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

Solution code:
s = input()
if s == "":
    print("No")
else:
    for i, s in enumerate(s):
        if i % 2:
            if s != "i":
                print("No")
                break
        else:
            if s != "h":
                print("No")
                break
    else:
        print("Yes")

Submission status: Wrong Answer

Solution code:
s = input()

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

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

Submission status: Wrong Answer

Solution code:
s = input()

if s=='hi' or s=='hihi' or s=='hihihi' or s=='hihihihi' or s=='hihihihihihi':
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
s = list(input())

for i in range(0, len(s) - 1, 2):
    #print(i)
    if not(s[i] == 'h' and s[i + 1] == 'i'):
        print("No")
        exit()
print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

main()

Submission status: Wrong Answer

Solution code:
S = input()

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

print(getHi(S))

Submission status: Wrong Answer

Solution code:
def solve():
    s = input()
    ans = 'No'
    for i in range(len(s)-1):
        if s[i] == 'h' and s[i+1] == 'i':
            ans = 'Yes'
    
    return ans

print(solve())

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S=input()

if S.count('hi')>=1:
  if len(S)//2==S.count('hi'):
    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:

a = input()

if a == 'hi' or 'hihi' or 'hihihi' or 'hihihihi' or 'hihihihihi':
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

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


def solve(S: str):
    ans = YES

    for i, s in enumerate(S):
        if i%2==0:
            if s != "h":
                ans = NO
                break
        else:
            if s != "i":
                ans = NO
                break
    print(ans)


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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    import sys
    #input = sys.stdin.readline
    sys.setrecursionlimit(10000000)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations
    #from itertools import accumulate, product
    from bisect import bisect_left,bisect_right
    from math import floor, ceil
    #from operator import itemgetter

    #mod = 1000000007

    s = list(input())
    if len(s)==1:
        print('No')
        exit()
    for i, x in enumerate(s):
        if i%2==0:
            if x!='h':
                print('No')
                exit()
        else:
            if x!='i':
                print('No')
                exit()
    print('Yes')


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
s = input()

f = True
for c in s[0::2]:
    if c != 'h':
        f = False

for c in s[1::2]:
    if c != 'i':
        f = False

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

Submission status: Wrong Answer

Solution code:
S = list(input())
ans = "No"
for i in range(len(S)):
    if ("".join(S[i:i+2]) == "hi"):
        ans = "Yes"
        break

print(ans)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
x = input()
y=0
for i in range(len(x)):
    if i % 2 == 0 :
        if x[i] != 'h':
            y=1
            break
    elif i % 2 ==1:
        if x[i] != 'i':
            y=1
            break

if y ==0:
    print("Yes")
elif y ==1:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
pr =""
for i in range(n):
    ne = s[i]
    if pr =="h" and ne == "i":
        print("Yes")
        break
    pr = ne
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
flag = False
for i in range(1, 5):
  if "hi"*i == S:
    flag = True
if flag:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S = input()

def main(S):

    for i, s in enumerate(S):

        if i % 2 == 0:
            if s == 'h': continue
            else       : return "No"
        
        else:
            if s == 'i': continue
            else       : return "No"

    else: return "Yes"
    

if __name__ == "__main__":

    answer = main(S)
    print(answer)

Submission status: Wrong Answer

Solution code:
s  = input()
n = len(s)
cnt = 0
for i in range(n-1):
    if(s[i:i+2] == 'hi'):
        print('Yes')
        cnt = 1
        break
        exit(0)
if cnt == 0 :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:
s = input()
if s.find("hi") != -1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = list(input())
c = 0
ans = 0
for i in range(len(s)):
    if s[i] == "h" and c == 0:
        c = 1
        ans += 1
    elif s[i] == "i" and c == 1:
        c = 0
        ans += 1
if ans == len(s):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys
S = input()

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

Submission status: Wrong Answer

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

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


def solve(S: str):
    if S.count("hi")==len(S)//2:
        print(YES)
    else:
        print(NO)
    return


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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
s = list(input())
for i, x in enumerate(s):
    if (i % 2 and x != "i") or (i % 2 == 0 and x != "h"):
        print("No"); break
else: print("Yes")

Submission status: Wrong Answer

Solution code:
import math
import sys

input = sys.stdin.readline


def main():
    s = input().strip()
    for idx in range(len(s)):
        if idx % 2 == 0 and s[idx] != 'h':
            print('No')
            return
        elif idx % 2 == 1 and s[idx] != 'i':
            print('No')
            return
    print('Yes')


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
S = input()
List = list(S)
ans = 1
h = 0

for i in range(len(List)):
  a = List[i]
  if a == "h":
    h = 1
  elif h == 1 and a == "i":
    h = 0
  else:
    ans = 0

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

Submission status: Wrong Answer

Solution code:
import sys

s = input()
for i in range(1,len(s)):
  if s[i-1:(i+1)] == 'hi':
    print('Yes')
    sys.exit()
    
print('No')

Submission status: Wrong Answer

Solution code:
s = str(input())

h = False

for c in s:
    if c == 'h':
        h = True
    if c == 'i' and h:
        print("Yes")
        exit()
print("No")

Submission status: Wrong Answer

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


if 'hi' in s:
  ans = 'Yes'

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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