Vova is again playing some computer game, now an RPG. In the game Vova's character received a quest: to slay the fearsome monster called Modcrab.

After two hours of playing the game Vova has tracked the monster and analyzed its tactics. The Modcrab has h_2 health points and an attack power of a_2. Knowing that, Vova has decided to buy a lot of strong healing potions and to prepare for battle.

Vova's character has h_1 health points and an attack power of a_1. Also he has a large supply of healing potions, each of which increases his current amount of health points by c_1 when Vova drinks a potion. All potions are identical to each other. It is guaranteed that c_1 > a_2.

The battle consists of multiple phases. In the beginning of each phase, Vova can either attack the monster (thus reducing its health by a_1) or drink a healing potion (it increases Vova's health by c_1; Vova's health can exceed h_1). Then, if the battle is not over yet, the Modcrab attacks Vova, reducing his health by a_2. The battle ends when Vova's (or Modcrab's) health drops to 0 or lower. It is possible that the battle ends in a middle of a phase after Vova's attack.

Of course, Vova wants to win the fight. But also he wants to do it as fast as possible. So he wants to make up a strategy that will allow him to win the fight after the minimum possible number of phases.

Help Vova to make up a strategy! You may assume that Vova never runs out of healing potions, and that he can always win.


-----Input-----

The first line contains three integers h_1, a_1, c_1 (1 ≤ h_1, a_1 ≤ 100, 2 ≤ c_1 ≤ 100) — Vova's health, Vova's attack power and the healing power of a potion.

The second line contains two integers h_2, a_2 (1 ≤ h_2 ≤ 100, 1 ≤ a_2 < c_1) — the Modcrab's health and his attack power.


-----Output-----

In the first line print one integer n denoting the minimum number of phases required to win the battle.

Then print n lines. i-th line must be equal to HEAL if Vova drinks a potion in i-th phase, or STRIKE if he attacks the Modcrab.

The strategy must be valid: Vova's character must not be defeated before slaying the Modcrab, and the monster's health must be 0 or lower after Vova's last action.

If there are multiple optimal solutions, print any of them.


-----Examples-----
Input
10 6 100
17 5

Output
4
STRIKE
HEAL
STRIKE
STRIKE

Input
11 6 100
12 5

Output
2
STRIKE
STRIKE



-----Note-----

In the first example Vova's character must heal before or after his first attack. Otherwise his health will drop to zero in 2 phases while he needs 3 strikes to win.

In the second example no healing needed, two strikes are enough to get monster to zero health and win with 6 health left.

Difficulty: EASY
Tags: Implementation

Greedy algorithms
Skill types: Greedy algorithms

Starter code:

Solutions:
(h1, a1, c1) = [int(j) for j in input().split()]
(h2, a2) = [int(j) for j in input().split()]
att = 0
if h2 % a1 == 0:
	att = int(h2 / a1)
else:
	att = int(h2 // a1 + 1)
i = 0
moves = 0
h11 = h1
while i < att:
	if i == att - 1:
		i += 1
		moves += 1
		h11 -= a2
	elif h11 <= a2:
		h11 += c1 - a2
		moves += 1
	else:
		h11 -= a2
		i += 1
		moves += 1
print(moves)
i = 0
while i < att:
	if i == att - 1:
		print('STRIKE')
		i += 1
		h1 -= a2
	elif h1 <= a2:
		print('HEAL')
		h1 += c1 - a2
	else:
		print('STRIKE')
		h1 -= a2
		i += 1


from sys import stdin, stdout
from collections import deque
(h1, a1, c) = map(int, stdin.readline().split())
(h2, a2) = map(int, stdin.readline().split())
ans = deque()
strike = h2 // a1 + int(h2 % a1 != 0)
for i in range(strike):
	ans.append('STRIKE')
(l, r) = (strike - 1, 10 ** 5)
while r - l > 1:
	m = l + r >> 1
	health = (m - strike) * c + h1
	if health > (m - 1) * a2:
		r = m
	else:
		l = m
for i in range(r - strike):
	ans.appendleft('HEAL')
stdout.write(str(len(ans)) + '\n')
for v in ans:
	stdout.write(v + '\n')


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
m = []
while h2 > 0:
	if h2 <= a1:
		m.append('STRIKE')
		h2 -= a1
	elif a2 >= h1:
		m.append('HEAL')
		h1 += c1
		h1 -= a2
	else:
		m.append('STRIKE')
		h2 -= a1
		if h2 <= 0:
			break
		h1 -= a2
print(len(m))
for i in range(len(m)):
	print(m[i])


(h1, a1, c1) = (int(i) for i in input().split())
(h2, a2) = map(int, input().split())
n = abs(-h2 // a1)
a = list()
while n > 0:
	if h2 - a1 > 0 and h1 - a2 <= 0:
		a.append('HEAL')
		h1 += c1
		h1 -= a2
	else:
		a.append('STRIKE')
		h2 -= a1
		h1 -= a2
		n -= 1
print(len(a))
for i in range(len(a)):
	print(a[i])


vova = list(map(int, input().split()))
crab = list(map(int, input().split()))
result = []
while crab[0] > 0:
	if vova[0] - crab[1] <= 0 and crab[0] - vova[1] > 0:
		vova[0] += vova[2]
		result.append('HEAL')
	else:
		crab[0] -= vova[1]
		result.append('STRIKE')
	vova[0] -= crab[1]
print(len(result))
for i in result:
	print(i)


(h1, a1, c1) = [int(i) for i in input().split()]
(h2, a2) = [int(i) for i in input().split()]
k = (h2 + a1 - 1) // a1
e = []
while k > 0:
	if k == 1:
		e.append('STRIKE')
		break
	if h1 <= a2:
		e.append('HEAL')
		h1 += c1
	else:
		e.append('STRIKE')
		k -= 1
	h1 -= a2
print(len(e))
for el in e:
	print(el)


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
out = []
while h2 > 0:
	if h2 <= a1:
		out.append('STRIKE')
		h2 -= a1
	elif h1 <= a2:
		out.append('HEAL')
		h1 += c1 - a2
	else:
		out.append('STRIKE')
		h1 -= a2
		h2 -= a1
print(len(out))
for i in out:
	print(i)


vova = list(map(int, input().split()))
crab = list(map(int, input().split()))
vova_h = vova[0]
vova_a = vova[1]
potion = vova[2]
crab_h = crab[0]
crab_a = crab[1]
result = []
while crab_h > 0:
	if vova_h - crab_a <= 0 and crab_h - vova_a > 0:
		vova_h += potion
		result.append('HEAL')
	else:
		crab_h -= vova_a
		result.append('STRIKE')
	vova_h -= crab_a
print(len(result))
for i in result:
	print(i)


def up_ceil(a, b):
	if a % b == 0:
		return a // b
	else:
		return a // b + 1
(h_1, a_1, c_1) = [int(i) for i in input().split()]
(h_2, a_2) = [int(i) for i in input().split()]
x = up_ceil(h_2, a_1)
A = h_1 - (x - 1) * a_2
B = c_1 - a_2
y = max(-A // B + 1, 0)
print(x + y)
for ii in range(y):
	print('HEAL')
for ii in range(x):
	print('STRIKE')


import sys
input = sys.stdin.readline
from collections import defaultdict as dc
from collections import Counter
from bisect import bisect_right, bisect_left, bisect
import math
from operator import itemgetter
from heapq import heapify, heappop, heappush
(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
c = 0
p = []
while h2 > 0:
	if h1 > 0 and h2 - a1 <= 0:
		p.append('STRIKE')
		h2 -= a1
	elif h1 - a2 > 0:
		p.append('STRIKE')
		h2 -= a1
		h1 -= a2
	else:
		p.append('HEAL')
		h1 += c1
		h1 -= a2
	c += 1
print(c)
for i in p:
	print(i)


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
res = []
while True:
	if h2 <= a1 or h1 > a2:
		h2 -= a1
		res += ['STRIKE']
	else:
		h1 += c1
		res += ['HEAL']
	if h2 <= 0:
		break
	h1 -= a2
print(len(res))
for x in res:
	print(x)


(h, a, c) = map(int, input().split())
(bh, ba) = map(int, input().split())
all = []
while bh > 0:
	if a >= bh:
		bh -= a
		all.append('STRIKE')
	elif h <= ba:
		h += c
		all.append('HEAL')
	else:
		bh -= a
		all.append('STRIKE')
	h -= ba
print(len(all))
print(*all, sep='\n')


class MustWin:

	def __init__(self, h1, a1, c1, h2, a2):
		self.h1 = h1
		self.a1 = a1
		self.c1 = c1
		self.a2 = a2
		self.h2 = h2
		self.flag = True
		self.res = []

	def use_HEAL(self):
		self.res.append('HEAL')
		self.h1 += self.c1
		self.h1 -= self.a2

	def use_STRIKE(self):
		self.res.append('STRIKE')
		self.h2 -= self.a1
		self.h1 -= self.a2

	def check_h1(self):
		if self.h1 <= self.a2:
			self.use_HEAL()
		else:
			self.use_STRIKE()

	def check_h2(self):
		if self.h2 <= self.a1:
			self.res.append('STRIKE')
			self.flag = False
		else:
			self.check_h1()

	def start_game(self):
		while self.flag:
			self.check_h2()

	def print_res(self):
		print(len(self.res))
		for i in self.res:
			print(i)
(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
must_win = MustWin(h1, a1, c1, h2, a2)
must_win.start_game()
must_win.print_res()


from collections import deque
(hv, av, cv) = [int(x) for x in input().split()]
(hc, ac) = [int(x) for x in input().split()]
q = deque()
q.append([hv, hc, []])
win = [1] * 20000
cc = 0
while len(q) != 0:
	seq = q.popleft()
	if seq[1] - av <= 0:
		if len(seq[2] + ['STRIKE']) < len(win):
			win = seq[2] + ['STRIKE']
	elif seq[0] - ac > 0:
		q.append([seq[0] - ac, seq[1] - av, seq[2] + ['STRIKE']])
	else:
		q.append([seq[0] + cv - ac, seq[1], seq[2] + ['HEAL']])
print(len(win))
for i in win:
	print(i)


import unittest
from functools import lru_cache
import math
(h1, a1, c1) = tuple(map(int, input().split()))
(h2, a2) = tuple(map(int, input().split()))
num_of_moves_to_kill = int(math.ceil(h2 / a1))
health_loosed = a2 * (num_of_moves_to_kill - 1)
if health_loosed < h1:
	print(num_of_moves_to_kill)
	for i in range(num_of_moves_to_kill):
		print('STRIKE')
else:
	health_needed = health_loosed - h1
	drinks = math.floor(health_needed / (c1 - a2)) + 1
	print(num_of_moves_to_kill + drinks)
	for i in range(drinks):
		print('HEAL')
	for i in range(num_of_moves_to_kill):
		print('STRIKE')


s = input().split()
(h1, a1, c1) = (int(s[0]), int(s[1]), int(s[2]))
ans = []
s = input().split()
(h2, a2) = (int(s[0]), int(s[1]))
while 1:
	if h2 - a1 <= 0:
		ans.append('STRIKE')
		break
	elif h1 - a2 <= 0:
		ans.append('HEAL')
		h1 += c1
	else:
		ans.append('STRIKE')
		h2 -= a1
	h1 -= a2
print(len(ans))
for i in ans:
	print(i)


(health1, atc1, pot) = map(int, input().split())
(health2, atc2) = map(int, input().split())
arr = []
health1 += atc2
while health2 > 0:
	health1 -= atc2
	if health2 <= atc1:
		arr.append('STRIKE')
		health2 -= atc1
		continue
	if health1 <= atc2:
		arr.append('HEAL')
		health1 += pot
		continue
	arr.append('STRIKE')
	health2 -= atc1
print(len(arr))
print(*arr, sep='\n')


(h1, a1, c1) = [int(i) for i in input().split()]
(h2, a2) = [int(i) for i in input().split()]
count = 0
output = []
while h2 > 0:
	if a1 >= h2:
		output.append('STRIKE')
		h2 -= a1
	elif h1 > a2:
		h1 -= a2
		h2 -= a1
		output.append('STRIKE')
	else:
		h1 -= a2
		h1 += c1
		output.append('HEAL')
	count += 1
print(count)
for each in output:
	print(each)


def read():
	return list(map(int, input().split()))
([[h1, a1, c1], [h2, a2]], b) = ([read() for i in range(2)], [])
while h2 > 0:
	if h1 > a2 or h2 <= a1:
		h2 -= a1
		b.append(True)
	else:
		h1 += c1
		b.append(False)
	h1 -= a2
print(len(b))
for o in b:
	print('STRIKE' if o else 'HEAL')


(h1, a1, c1) = input().split()
(h2, a2) = input().split()
moves = 0
list1 = []
h1 = int(h1)
a1 = int(a1)
c1 = int(c1)
h2 = int(h2)
a2 = int(a2)
count = 0
while h2 > 0:
	if h1 <= a2 and h2 > a1:
		h1 = h1 + c1 - a2
		list1.append('HEAL')
		count += 1
	else:
		h2 = h2 - a1
		list1.append('STRIKE')
		count += 1
		if h2 > 0:
			h1 = h1 - a2
print(count)
for i in range(len(list1)):
	print(list1[i])


import math
(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
m = 0
L = []
while True:
	if h1 > a2 or a1 >= h2:
		L.append('STRIKE')
		m = m + 1
		h2 = h2 - a1
		h1 = h1 - a2
	else:
		L.append('HEAL')
		m = m + 1
		h1 = h1 + c1 - a2
		h2 = h2
	if h2 <= 0:
		break
	else:
		continue
print(m)
for i in range(m):
	print(L[i])


(h1, a1, c) = map(int, input().split())
(h2, a2) = map(int, input().split())
(7, 5)
av = -(h2 // -a1)
ak = -(h1 // -a2)
heal = 0
while ak < av:
	h1 += c - a2
	heal += 1
	ak = -(h1 // -a2)
print(av + heal)
for i in range(av + heal):
	if heal != 0:
		print('HEAL')
		heal -= 1
	else:
		print('STRIKE')


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
li = []
while 1:
	if h1 - a2 > 0 or h2 - a1 <= 0:
		h2 -= a1
		li.append('STRIKE')
	else:
		li.append('HEAL')
		h1 += c1
	if h2 <= 0:
		break
	h1 -= a2
print(len(li))
for i in li:
	print(i)


def ceiling(num, denom):
	return (num + denom - 1) // denom

def strategy(h1, a1, c1, h2, a2):
	strikes = ceiling(h2, a1)
	health = a2 * (strikes - 1) + 1
	potion = 0
	if h1 < health:
		potion = ceiling(health - h1, c1 - a2)
	print(potion + strikes)
	while potion > 0:
		print('HEAL')
		potion -= 1
	while strikes > 0:
		print('STRIKE')
		strikes -= 1

def test():
	strategy(10, 6, 100, 17, 5)
	strategy(11, 6, 100, 12, 5)
	strategy(9, 6, 6, 17, 5)

def ni():
	s = input()
	while len(s) == 0:
		s = input()
	try:
		return int(s)
	except:
		return 0

def nia():
	s = input()
	while len(s) == 0:
		s = input()
	s = s.split()
	iVal = []
	for i in range(len(s)):
		iVal.append(int(s[i]))
	return iVal
vivo = nia()
monster = nia()
strategy(vivo[0], vivo[1], vivo[2], monster[0], monster[1])


(h1, a1, c1) = input().split()
(h2, a2) = input().split()
h1 = int(h1)
h2 = int(h2)
a1 = int(a1)
a2 = int(a2)
c1 = int(c1)
ans = []
while h2 > 0:
	if h1 - a2 <= 0 and h2 - a1 > 0:
		ans.append('HEAL')
		h1 = h1 + c1 - a2
	else:
		ans.append('STRIKE')
		h1 = h1 - a2
		h2 = h2 - a1
print(len(ans))
for i in ans:
	print(i)


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
ans = []
while True:
	if h2 <= a1:
		ans.append('STRIKE')
		break
	if h1 <= a2:
		ans.append('HEAL')
		h1 += c1 - a2
	else:
		ans.append('STRIKE')
		h1 -= a2
		h2 -= a1
		if h2 <= 0:
			break
print(len(ans))
for c in ans:
	print(c)


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
i = 1
a = []
while h2 > 0:
	if h1 - a2 <= 0 and h2 - a1 > 0:
		h1 += c1
		a.append(0)
	else:
		h2 -= a1
		a.append(1)
	h1 -= a2
print(len(a))
for x in a:
	print('STRIKE' if x else 'HEAL')


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

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

def li():
	return list(mi())
(h1, a1, c1) = mi()
(h2, a2) = mi()
ans = []
while h2 > 0:
	h1 -= a2
	if h1 > 0 or h2 <= a1:
		ans += ['STRIKE']
		h2 -= a1
	else:
		ans += ['HEAL']
		h1 += c1
print(len(ans))
print(*ans, sep='\n')


(h1, a1, c1) = [int(i) for i in input().split()]
(h2, a2) = [int(i) for i in input().split()]
p = h2 // a1
if h2 % a1 != 0:
	p += 1
(q, count) = (p - 1, 0)
while h1 <= a2 * q:
	count += 1
	h1 += c1
	h1 -= a2
print(count + p)
for i in range(count):
	print('HEAL')
for i in range(p):
	print('STRIKE')


R = lambda : map(int, input().split())
(h, a, c) = R()
(g, b) = R()
l = []
while g > 0:
	if h <= b and g > a:
		l.append('HEAL')
		h += c - b
	else:
		l.append('STRIKE')
		g -= a
		h -= b
print(len(l), *l, sep='\n')


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
n = 0
act = []
while h2 > 0:
	if h2 - a1 <= 0:
		n += 1
		h2 -= a1
		act.append('STRIKE')
	elif h1 > a2:
		n += 1
		h2 -= a1
		act.append('STRIKE')
	else:
		n += 1
		h1 += c1
		act.append('HEAL')
	h1 -= a2
print(n)
print('\n'.join(act))


(h1, a1, c1) = list(map(int, input().split()))
(h2, a2) = list(map(int, input().split()))
actions = [0] * 10000
j = 0
while h2 >= 0:
	if h2 <= a1:
		actions[j] = 1
		j += 1
		break
	if h1 <= a2:
		actions[j] = 2
		j += 1
		h1 += c1 - a2
		continue
	actions[j] = 1
	j += 1
	h1 -= a2
	h2 -= a1
print(j)
for i in range(j):
	if actions[i] == 1:
		print('STRIKE')
	elif actions[i] == 2:
		print('HEAL')


import math

def getStrategy(h1, a1, c1, h2, a2):
	count = 0
	result = []
	while h2 > 0:
		count += 1
		if h2 > a1 and h1 < a2 + 1:
			h1 += c1
			result.append('HEAL')
		else:
			h2 -= a1
			result.append('STRIKE')
		h1 -= a2
	return [str(count)] + result
(h1, a1, c1) = [int(x) for x in input().split()]
(h2, a2) = [int(x) for x in input().split()]
res = getStrategy(h1, a1, c1, h2, a2)
print('\n'.join(res))


(h1, a1, c1) = map(int, input().split(' '))
(h2, a2) = map(int, input().split(' '))
s = 0
d = ''
while h2 > 0:
	if h1 - a2 > 0 or h2 - a1 <= 0:
		d += 'STRIKE '
		h2 -= a1
		h1 -= a2
		s += 1
	elif h1 - a2 <= 0:
		d += 'HEAL '
		h1 += c1 - a2
		s += 1
print(s)
while d != '':
	m2 = d.find(' ')
	print(d[:m2])
	d = d[m2 + 1:]


(h1, a1, c1) = [int(i) for i in input().split(' ')]
(h2, a2) = [int(i) for i in input().split(' ')]
Moves = []
while h2 > 0:
	if h2 - a1 <= 0:
		Moves.append('STRIKE')
		h2 -= a1
	elif h1 - a2 <= 0:
		Moves.append('HEAL')
		h1 += c1
	else:
		Moves.append('STRIKE')
		h2 -= a1
	h1 -= a2
print(len(Moves))
print(*Moves, sep='\n')


import math
(h1, a1, c1) = [int(i) for i in input().split()]
(h2, a2) = [int(i) for i in input().split()]
strikeV = math.ceil(h2 / a1)
strikeM = math.ceil(h1 / a2)
if strikeV <= strikeM:
	print(strikeV)
	for i in range(strikeV):
		print('STRIKE')
	exit()
reqd = a2 * (strikeV - 1) + 1 - h1
potions = math.ceil(reqd / (c1 - a2))
print(strikeV + potions)
for i in range(potions):
	print('HEAL')
for i in range(strikeV):
	print('STRIKE')


(h1, a1, c) = list(map(int, input().split()))
(h2, a2) = list(map(int, input().split()))
y = (h2 + a1 - 1) // a1
x = max(a2 * (y - 1) - h1 + c - a2, 0) // (c - a2)
print(x + y)
for i in range(x):
	print('HEAL')
for i in range(y):
	print('STRIKE')


(a, b, c) = map(int, input().split())
(a1, b1) = map(int, input().split())
x = (a1 + b - 1) // b
y = max(0, ((x - 1) * b1 - a) // (c - b1) + 1)
print(x + y)
print('HEAL\n' * y + 'STRIKE\n' * x)


import sys
import math
import itertools
import functools
import collections
import operator
import fileinput
import copy
ORDA = 97

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

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

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

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=2):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	newnumber = 0
	while number > 0:
		newnumber += number % base
		number //= base
	return newnumber

def cdiv(n, k):
	return n // k + (n % k != 0)

def ispal(s):
	for i in range(len(s) // 2 + 1):
		if s[i] != s[-i - 1]:
			return False
	return True
(h1, a1, c1) = mi()
(h2, a2) = mi()
ans = []
while h2 > 0:
	if h2 <= a1:
		ans.append('STRIKE')
		break
	elif h1 - a2 > 0:
		h2 -= a1
		h1 -= a2
		ans.append('STRIKE')
	else:
		h1 = h1 - a2 + c1
		ans.append('HEAL')
print(len(ans))
print(*ans, sep='\n')


inp = [int(i) for i in input().split()]
h1 = inp[0]
a1 = inp[1]
c1 = inp[2]
inp = [int(i) for i in input().split()]
h2 = inp[0]
a2 = inp[1]
k = 0
res = []
while h2 > 0:
	if h2 - a1 <= 0:
		res.append('STRIKE')
		k += 1
		break
	if h1 - a2 <= 0:
		res.append('HEAL')
		k += 1
		h1 = h1 + c1 - a2
	else:
		res.append('STRIKE')
		k += 1
		h1 -= a2
		h2 -= a1
print(k)
print('\n'.join(res))


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
actions = []
while h2 > 0:
	iDie = h1 // a2
	iDie += 1 if h1 % a2 > 0 else 0
	heDie = h2 // a1
	heDie += 1 if h2 % a1 > 0 else 0
	if iDie <= 1 and heDie <= 1:
		actions.append('STRIKE')
		h2 -= a1
		h1 -= a2
	elif iDie <= 1 and heDie > 1:
		actions.append('HEAL')
		h1 += c1
		h1 -= a2
	else:
		actions.append('STRIKE')
		h2 -= a1
		h1 -= a2
print(len(actions))
for a in actions:
	print(a)


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

def main():
	(h1, a1, c1) = readline()
	(h2, a2) = readline()
	actions = list()
	while h2 > 0:
		if h2 <= a1:
			actions.append('STRIKE')
			h2 -= a1
		elif h1 <= a2:
			actions.append('HEAL')
			h1 += c1
		else:
			actions.append('STRIKE')
			h2 -= a1
		h1 -= a2
	print(len(actions))
	print('\n'.join(actions))
main()


import sys, math, queue, bisect
MOD = 10 ** 9 + 7
sys.setrecursionlimit(1000000)
(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
move = ['STRIKE', 'HEAL']
ans = []
t = 0
while h2 > 0:
	if t == 0:
		if a1 >= h2:
			ans.append(0)
			h2 -= a1
		elif h1 > a2:
			h2 -= a1
			ans.append(0)
		else:
			ans.append(1)
			h1 += c1
	else:
		h1 -= a2
	t = t ^ 1
print(len(ans))
for ai in ans:
	print(move[ai])


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
move = []
while True:
	while h1 <= a2 and h2 > a1:
		move.append('HEAL')
		h1 += c1 - a2
	move.append('STRIKE')
	h2 -= a1
	h1 -= a2
	if h2 <= 0:
		break
print(len(move))
for step in move:
	print(step)


str1 = [int(n) for n in input().split()]
str2 = [int(n) for n in input().split()]
a = []
while str2[0] > 0:
	if str2[0] <= str1[1]:
		str2[0] = 0
		a.append('STRIKE')
	elif str1[0] <= str2[1]:
		a.append('HEAL')
		str1[0] += str1[2]
	else:
		str2[0] -= str1[1]
		a.append('STRIKE')
	str1[0] -= str2[1]
print(len(a))
for i in range(0, len(a)):
	print(a[i])


a = [int(x) for x in input().split()]
h1 = a[0]
a1 = a[1]
c1 = a[2]
a = [int(x) for x in input().split()]
h2 = a[0]
a2 = a[1]
H1 = h1
H2 = h2
if h2 - a1 <= 0:
	print(1)
	print('STRIKE')
else:
	p = 0
	seq = []
	while H2 - a1 > 0:
		if H1 > a2:
			H2 = H2 - a1
			seq.append('STRIKE')
		else:
			H1 = H1 + c1
			seq.append('HEAL')
		p = p + 1
		if H2 > 0:
			H1 = H1 - a2
	print(p + 1)
	for i in seq:
		print(i)
	print('STRIKE')


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
n = 0
goes = []
while h2 > 0:
	if a1 >= h2:
		goes.append('s')
		h2 -= a1
	elif h1 < a2:
		goes.append('h')
		h1 += c1 - a2
	elif h1 > a2:
		goes.append('s')
		h2 -= a1
		h1 -= a2
	elif a1 >= h2:
		goes.append('s')
		h2 -= a1
	else:
		goes.append('h')
		h1 += c1 - a2
print(len(goes))
for i in goes:
	if i == 's':
		print('STRIKE')
	if i == 'h':
		print('HEAL')


from math import ceil

def main():
	(h1, a1, c1) = map(int, input().split())
	(h2, a2) = map(int, input().split())
	res = []
	while h2 > 0:
		if h1 > a2 or h2 - a1 <= 0:
			res.append('STRIKE')
			h2 -= a1
		else:
			res.append('HEAL')
			h1 += c1
		h1 -= a2
	print(len(res))
	print('\n'.join(res))
main()


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
ansn = 0
ans = []
while h2 > 0:
	if a2 < h1 or h2 - a1 <= 0:
		ans.append('STRIKE')
		h2 -= a1
	else:
		ans.append('HEAL')
		h1 += c1
	h1 -= a2
	ansn += 1
print(ansn)
for i in ans:
	print(i)


def main():
	buff = input().split()
	(h1, a1, c1) = (int(buff[0]), int(buff[1]), int(buff[2]))
	buff = input().split()
	(h2, a2) = (int(buff[0]), int(buff[1]))
	strategy = []
	while h2 > 0:
		if h1 - a2 <= 0 and h2 - a1 > 0:
			strategy.append('HEAL')
			h1 += c1 - a2
		else:
			strategy.append('STRIKE')
			h2 -= a1
			h1 -= a2
	return '{}\n{}'.format(len(strategy), '\n'.join(strategy))
print(main())


(h1, a1, c1) = [int(x) for x in input().strip().split(' ')]
(h2, a2) = [int(x) for x in input().strip().split(' ')]
assert c1 > a2
phases = []
while h2 > 0:
	if h2 - a1 <= 0:
		phases.append('STRIKE')
		h2 -= a1
	elif h1 - a2 <= 0:
		phases.append('HEAL')
		h1 += c1
	else:
		phases.append('STRIKE')
		h2 -= a1
	h1 -= a2
print('{number_of_phases}'.format(number_of_phases=len(phases)))
for move in phases:
	print(move)


(H, A, C) = input().strip().split()
h1 = int(H)
a1 = int(A)
c1 = int(C)
(H, A) = input().strip().split()
h2 = int(H)
a2 = int(A)
c = 0
l = list()
heals = 0
strikes = 0
if h2 % a1 != 0:
	strikes = 1
strikes = strikes + int(h2 / a1)
netheal = c1 - a2
tank = 0
if h1 % a2 != 0:
	tank = 1
tank = tank + int(h1 / a2)
while strikes > tank:
	heals = heals + 1
	h1 = h1 + netheal
	tank = 0
	if h1 % a2 != 0:
		tank = 1
	tank = tank + int(h1 / a2)
print(heals + strikes)
for i in range(0, heals):
	print('HEAL')
for i in range(0, strikes):
	print('STRIKE')


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
c = 0
l = []
while h2 > 0 and h1 > 0:
	if h1 > a2:
		l = l + ['STRIKE']
		h2 = h2 - a1
		h1 = h1 - a2
	elif h2 <= a1:
		l = l + ['STRIKE']
		h2 = h2 - a1
		h1 = h1 - a2
	elif h1 <= a2:
		h1 = h1 + c1
		h1 = h1 - a2
		l = l + ['HEAL']
	c = c + 1
print(c)
c = 0
while c < len(l):
	print(l[c])
	c = c + 1


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
ans = list()
while True:
	if h1 <= a2 and h2 > a1:
		ans.append('HEAL')
		h1 += c1
	else:
		ans.append('STRIKE')
		h2 -= a1
		if h2 <= 0:
			break
	h1 -= a2
print(len(ans))
print('\n'.join(ans))


R = lambda : map(int, input().split())
(h, a, c) = R()
(g, b) = R()
k = (g + a - 1) // a
n = max(b * (k - 1) - h, -1) // (c - b) + 1
print(n + k)
print('HEAL\n' * n + 'STRIKE\n' * k)


a = input().split()
b = input().split()
player_current_hp = int(a[0])
player_max_hp = int(a[0])
player_damage = int(a[1])
player_heal = int(a[2])
boss_hp = int(b[0])
boss_damage = int(b[1])
steps = 0
move = []
while boss_hp > 0:
	if boss_hp <= player_damage:
		steps += 1
		move.append(1)
		boss_hp -= player_damage
		continue
	if player_current_hp <= boss_damage:
		steps += 1
		move.append(0)
		player_current_hp += player_heal
		player_current_hp -= boss_damage
		continue
	if player_current_hp > boss_damage:
		boss_hp -= player_damage
		player_current_hp -= boss_damage
		steps += 1
		move.append(1)
i = 0
print(steps)
while i < steps:
	if move[i] == 0:
		print('HEAL')
	else:
		print('STRIKE')
	i += 1


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
p = h2 // a1
if h2 % a1 != 0:
	p += 1
n = 0
while h2 > 0:
	if h1 <= a2 and h2 > a1:
		n += 1
		h1 += c1 - a2
	else:
		h2 -= a1
		h1 -= a2
print(p + n)
for i in range(n):
	print('HEAL')
for i in range(p):
	print('STRIKE')


(h1, a1, c1) = [*map(int, input().split())]
(h2, a2) = [*map(int, input().split())]
c = []
for i in range(10 ** 9):
	if i % 2 == 0:
		if a1 >= h2:
			c.append('STRIKE')
			break
		elif h1 - a2 > 0:
			h2 -= a1
			c.append('STRIKE')
			if h2 <= 0:
				break
		else:
			h1 += c1
			c.append('HEAL')
	else:
		h1 -= a2
print(len(c))
for i in c:
	print(i)


import math
import collections

def solve(h1, a1, c1, h2, a2):
	cnt = 0
	moves = []
	while h2 > 0:
		if h2 - a1 <= 0:
			moves.append('STRIKE')
			h2 -= a1
		elif h1 - a2 <= 0:
			moves.append('HEAL')
			h1 += c1
		else:
			moves.append('STRIKE')
			h2 -= a1
		h1 -= a2
		cnt += 1
	return str(cnt) + '\n' + '\n'.join(moves)
(h1, a1, c1) = [int(s) for s in input().split()]
(h2, a2) = [int(s) for s in input().split()]
result = solve(h1, a1, c1, h2, a2)
print(result)


import math

def Solve():
	(h111, a111, c111) = map(int, input().split())
	(h222, a222) = map(int, input().split())
	q111 = h111 % a222
	n = math.ceil(h222 / a111)
	count = 0
	while h111 / a222 <= n - 1:
		if h111 / a222 == n - 1 and q111 > 0:
			break
		else:
			count += 1
			h111 += c111 - a222
			q111 = h111 % a222
	print(n + count)
	for i in range(0, count):
		print('HEAL')
	for i in range(0, n):
		print('STRIKE')
Solve()


(i, s, a, b) = (0, [], list(map(int, input().split())), list(map(int, input().split())))
while b[0] > 0:
	if a[0] - b[1] > 0 or b[0] - a[1] <= 0:
		s.append('STRIKE')
		b[0] -= a[1]
	else:
		s.append('HEAL')
		a[0] += a[2]
	a[0] -= b[1]
	i += 1
print(i)
for i in s:
	print(i)


(h1, a1, c1) = [int(i) for i in input().split()]
(h2, a2) = [int(i) for i in input().split()]
a = []
while h2 > 0:
	if h1 > a2 or h2 - a1 <= 0:
		a.append('STRIKE')
		h2 -= a1
	else:
		a.append('HEAL')
		h1 += c1
	h1 -= a2
print(len(a))
for i in range(len(a)):
	print(a[i])


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
r = 0
s = []
while 1:
	r += 1
	if a1 >= h2:
		s.append('STRIKE')
		break
	elif h1 > a2:
		s.append('STRIKE')
		h1 -= a2
		h2 -= a1
	else:
		s.append('HEAL')
		h1 += c1 - a2
print(r)
for _ in range(r):
	print(s[_])


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
a = ''
while h2 > 0:
	if h1 <= a2 and h2 > a1:
		a += 'h'
		h1 += c1 - a2
	else:
		a += 'a'
		h2 = h2 - a1
		h1 -= a2
print(len(a))
for i in range(len(a)):
	if a[i] == 'h':
		print('HEAL')
	else:
		print('STRIKE')


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
ans = ''
cnt = 0
while h2 > 0:
	if h1 > a2:
		ans += 'STRIKE\n'
		h1 -= a2
		h2 -= a1
	elif a1 >= h2:
		ans += 'STRIKE\n'
		h2 -= a1
	else:
		ans += 'HEAL\n'
		h1 += c1 - a2
	cnt += 1
print(cnt)
print(ans)


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
ans = 0
ad = []
while 1:
	ans += 1
	if h1 <= a2 and h2 > a1:
		h1 += c1
		ad.append('HEAL')
	else:
		h2 -= a1
		ad.append('STRIKE')
	if h2 <= 0:
		break
	h1 -= a2
print(ans)
for d in ad:
	print(d)


(hp, a, c) = map(int, input().split())
(mhp, ma) = map(int, input().split())
count = 0
l = []
while mhp > 0:
	count += 1
	if mhp <= a:
		l.append('STRIKE')
		break
	if hp <= ma:
		l.append('HEAL')
		hp += c
	else:
		l.append('STRIKE')
		mhp -= a
	hp -= ma
print(count)
for i in l:
	print(i)


def main():
	(h1, a1, c) = map(int, input().split())
	(h2, a2) = map(int, input().split())
	out = []
	while h2 > 0:
		if a2 < h1 or a1 >= h2:
			out.append('STRIKE')
			h2 -= a1
			h1 -= a2
		else:
			out.append('HEAL')
			h1 += c
			h1 -= a2
	print(len(out))
	for s in out:
		print(s)
main()


(pht, pa, phl) = map(int, input().split())
(bht, ba) = map(int, input().split())
st = []
while bht > 0:
	if pht <= ba and bht > pa:
		st += ['HEAL']
		pht += phl
	else:
		bht -= pa
		st += ['STRIKE']
	pht -= ba
print(len(st))
print('\n'.join(st))


(hp, dmg, heal) = map(int, input().split())
(bosshp, bossdmg) = map(int, input().split())
turn = 0
a = []
while bosshp > 0:
	life = hp // bossdmg
	if hp % bossdmg > 0:
		life = life + 1
	bosslife = bosshp // dmg
	if bosshp % dmg > 0:
		bosslife = bosslife + 1
	if life > 1 or life == bosslife:
		bosshp = bosshp - dmg
		hp = hp - bossdmg
		a.append('STRIKE')
	else:
		hp = hp + heal - bossdmg
		a.append('HEAL')
	turn = turn + 1
print(turn)
for i in range(turn):
	print(a[i])


def get_int(string, n):
	i = j = k = 0
	for s in string:
		k += 1
	for s in string:
		if i == n - 1:
			break
		if s == ' ':
			i += 1
		j += 1
	i = 0
	while j < k:
		if string[j] == ' ':
			break
		i = 10 * i + int(string[j])
		j += 1
	return i
x = input()
y = input()
h1 = get_int(x, 1)
a1 = get_int(x, 2)
c1 = get_int(x, 3)
h2 = get_int(y, 1)
a2 = get_int(y, 2)
ls = []
i = 0
while h1 > 0 and h2 > 0:
	i += 1
	if h1 <= a2 and a1 < h2:
		ls += ['HEAL']
		h1 += c1 - a2
		continue
	else:
		ls += ['STRIKE']
		h2 -= a1
		h1 -= a2
		continue
print(i)
for i in ls:
	print(i)


mas = []
(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
while h2 >= 0:
	if h1 - a2 < 1 and h2 - a1 > 0:
		h1 += c1
		h1 -= a2
		mas.append('HEAL')
	else:
		h2 -= a1
		h1 -= a2
		mas.append('STRIKE')
		if h2 < 1:
			break
print(len(mas))
print('\n'.join(mas))


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
ans = []
c = 0
while h2 > 0:
	if a1 >= h2:
		h2 = h2 - a1
		ans.append('STRIKE')
	elif h1 <= a2:
		h1 = h1 + c1
		ans.append('HEAL')
	else:
		h2 = h2 - a1
		ans.append('STRIKE')
	c = c + 1
	h1 = h1 - a2
print(c)
for i in ans:
	print(i)


src = input()
(h1, a1, c1) = map(int, src.split())
src = input()
(h2, a2) = map(int, src.split())
res = []
while True:
	if a1 >= h2:
		res.append(0)
		break
	elif h1 <= a2:
		res.append(1)
		h1 += c1 - a2
	else:
		res.append(0)
		h1 -= a2
		h2 -= a1
print(len(res))
for x in res:
	if x == 0:
		print('STRIKE')
	else:
		print('HEAL')


import math
(s, h) = (0, 0)
(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
while h2 > 0:
	if h2 <= a1 or h1 > a2:
		s += 1
		h1 -= a2
		h2 -= a1
	else:
		h += 1
		h1 -= a2
		h1 += c1
print(h + s, '\nHEAL' * h + '\nSTRIKE' * s)


vova = [int(i) for i in input().split(' ')]
modcrab = [int(j) for j in input().split(' ')]
h1 = vova[0]
a1 = vova[1]
c1 = vova[2]
h2 = modcrab[0]
a2 = modcrab[1]
strat = []
moves = 0
h = 'HEAL'
s = 'STRIKE'
while h2 > 0:
	if h2 - a1 > 0 and h1 - a2 <= 0:
		h1 += c1
		strat.append(h)
	else:
		h2 -= a1
		strat.append(s)
	moves += 1
	h1 -= a2
print(moves)
for i in strat:
	print(i)


from sys import stdin, stdout
from collections import Counter

def ai():
	return list(map(int, stdin.readline().split()))

def ei():
	return map(int, stdin.readline().split())

def ip():
	return int(stdin.readline().strip())

def op(ans):
	return stdout.write(str(ans) + '\n')
(h1, a1, heal) = ei()
(h2, a2) = ei()
count = 0
li = []
while h2 > 0:
	if h2 > 0 and h1 > a2 or a1 >= h2:
		h2 -= a1
		li.append('STRIKE')
		count += 1
		if h2 <= 0:
			break
		h1 -= a2
	elif h1 <= a2 and h2 > 0:
		li.append('HEAL')
		count += 1
		h1 += heal
		h1 -= a2
print(count)
for i in li:
	print(i)


x = input()
x = x.split()
y = input()
y = y.split()
h1 = int(x[0])
a1 = int(x[1])
c1 = int(x[2])
h2 = int(y[0])
a2 = int(y[1])
c1 = c1 - a2
vovwin = 0
modrwin = 0
heal = 0
q = 0

def count(h, a):
	win = h / a
	if int(win) < win:
		return int(win) + 1
	else:
		return int(win)
vovwin = count(h2, a1)
q = (vovwin - 1) * a2
q = q - h1 + 1
heal = q / c1
modrwin = count(h1, a2)
if modrwin >= vovwin:
	print(vovwin)
	for i in range(vovwin):
		print('STRIKE')
else:
	if int(heal) < heal:
		heal = int(heal) + 1
	else:
		heal = int(heal)
	print(vovwin + heal)
	for i in range(heal):
		print('HEAL')
	for i in range(vovwin):
		print('STRIKE')


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
d = []
while h2 > 0:
	if h1 - a2 <= 0 and h2 - a1 > 0:
		d.append('HEAL')
		h1 += c1
		h1 -= a2
		continue
	d.append('STRIKE')
	h2 -= a1
	h1 -= a2
	if h2 <= 0:
		break
print(len(d))
for i in d:
	print(i)


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
ans = []
while h2 // a1 + (h2 % a1 != 0) > h1 // a2 + (h1 % a2 != 0):
	h1 += c1 - a2
	ans.append('HEAL')
ans.extend(['STRIKE'] * (h2 // a1 + (h2 % a1 != 0)))
print(len(ans))
print('\n'.join(ans))


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
if h2 < a1:
	print(1)
	print('STRIKE')
else:
	j = h2 % a1
	if j == 0:
		kolud = int(h2 // a1 - 1)
	else:
		kolud = int(h2 // a1)
	uron = c1 - a2
	zdorowje = h1 - kolud * a2
	lechenie = 0
	while zdorowje <= 0:
		zdorowje += uron
		lechenie += 1
	print(lechenie + kolud + 1)
	for i in range(lechenie):
		print('HEAL')
	for i in range(kolud + 1):
		print('STRIKE')


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
d = []
x = 0
while h2 > 0:
	if h2 <= a1:
		d.append('STRIKE')
		h2 -= a1
		x += 1
	elif h1 - a2 <= 0:
		d.append('HEAL')
		x += 1
		h1 += c1 - a2
	else:
		h2 -= a1
		d.append('STRIKE')
		h1 -= a2
		x += 1
print(x)
for t in range(x):
	print(d[t])


class Character:

	def __init__(self, hPoints, attPoints, healPoints):
		self.hPoints = hPoints
		self.attPoints = attPoints
		self.healPoints = healPoints

	def attack(self, boss):
		boss.setHP(boss.getHP() - self.attPoints)

	def recAttack(self, boss):
		self.hPoints -= boss.getAP()

	def heal(self):
		self.hPoints += self.healPoints

	def getHP(self):
		return self.hPoints

	def getAP(self):
		return self.attPoints

	def getHLP(self):
		return self.healPoints

class Boss:

	def __init__(self, hPoints, attPoints):
		self.hPoints = hPoints
		self.attPoints = attPoints

	def setHP(self, nextHP):
		self.hPoints = nextHP

	def getAP(self):
		return self.attPoints

	def getHP(self):
		return self.hPoints

def game(vova, modcrab):
	numTurns = 0
	vovaHP = vova.getHP()
	vovaAP = vova.getAP()
	vovaHeal = vova.getHLP()
	mcHP = modcrab.getHP()
	mcAP = modcrab.getAP()
	while mcHP > 0:
		if vovaHP - mcAP > 0 or vovaAP >= mcHP:
			mcHP -= vovaAP
			vovaHP -= mcAP
		else:
			vovaHP += vovaHeal
			vovaHP -= mcAP
		numTurns += 1
	print(numTurns)
	while modcrab.getHP() > 0:
		if vova.getHP() - modcrab.getAP() > 0 or vova.getAP() >= modcrab.getHP():
			vova.attack(modcrab)
			vova.recAttack(modcrab)
			print('STRIKE')
		else:
			vova.heal()
			vova.recAttack(modcrab)
			print('HEAL')
	return
vStats = input().split()
mStats = input().split()
vova = Character(int(vStats[0]), int(vStats[1]), int(vStats[2]))
modcrab = Boss(int(mStats[0]), int(mStats[1]))
game(vova, modcrab)


def solve(h1, h2, a1, c1, a2):
	global memo
	if (h1, h2) in memo:
		return memo[h1, h2]
	strike = 'STRIKE'
	heal = 'HEAL'
	if h2 <= 0:
		return []
	ret = []
	while h2 - a1 > 0 and h1 - a2 <= 0:
		h1 = h1 + c1 - a2
		ret.append(heal)
	ret2 = solve(h1 - a2, h2 - a1, a1, c1, a2)
	memo[h1, h2] = ret + [strike] + ret2
	return memo[h1, h2]
(h1, a1, c1) = list(map(int, input().split(' ')))
(h2, a2) = list(map(int, input().split(' ')))
memo = {}
actions = solve(h1, h2, a1, c1, a2)
print(len(actions))
for a in actions:
	print(a)


(h1, a1, c1) = list(map(int, input().split()))
(h2, a2) = list(map(int, input().split()))
res = []
while h2 > 0:
	if h1 <= a2 and h2 > a1:
		h1 += c1
		res.append('HEAL')
		h1 -= a2
	else:
		h2 -= a1
		res.append('STRIKE')
		h1 -= a2
print(len(res))
print('\n'.join(res))


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
s = h2 // a1 + int(h2 % a1 != 0)
l = []
h = 0
while h1 + h * c1 - max(h + s - 1, 0) * a2 <= 0:
	h += 1
for i in range(h):
	l.append('HEAL')
for i in range(s):
	l.append('STRIKE')
print(len(l))
for i in range(len(l)):
	print(l[i])


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
ans = []
while h2 > 0:
	if h1 > a2 or a1 >= h2:
		ans.append('STRIKE')
		h2 -= a1
		h1 -= a2
	else:
		ans.append('HEAL')
		h1 += c1 - a2
print(len(ans))
print('\n'.join(ans))


hero = [int(x) for x in input().split()]
villain = [int(x) for x in input().split()]
l = []
while villain[0] > 0:
	if hero[1] >= villain[0]:
		l.append('STRIKE')
		break
	if hero[0] > villain[1]:
		l.append('STRIKE')
		villain[0] -= hero[1]
		if villain[0] <= 0:
			break
		hero[0] -= villain[1]
	else:
		l.append('HEAL')
		hero[0] += hero[2] - villain[1]
print(len(l))
for i in l:
	print(i)


import sys
(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
ans = []
for turn in range(1, 1000000):
	if h2 <= a1 or h1 > a2:
		ans.append('STRIKE')
		h2 -= a1
	else:
		ans.append('HEAL')
		h1 += c1
	if h2 <= 0:
		print(turn)
		print(*ans, sep='\n')
		break
	h1 -= a2


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
s = []
i = 0
while h2 > 0:
	if h1 <= a2 and h2 > a1:
		h1 += c1
		s.append(False)
	else:
		h2 -= a1
		s.append(True)
	i += 1
	h1 -= a2
print(i)
for b in s:
	print('STRIKE' if b else 'HEAL')


from math import ceil as ceil
(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
s = ''
while h2 > 0:
	if h1 > a2 or a1 >= h2:
		s += 's'
		h2 -= a1
		h1 -= a2
	else:
		s += 'h'
		h1 += c1
		h1 -= a2
print(len(s))
for i in s:
	if i == 's':
		print('STRIKE')
	else:
		print('HEAL')


a = list(map(int, input().split()))
b = list(map(int, input().split()))
t = []
while b[0] > 0:
	if b[1] >= a[0] and a[1] < b[0]:
		a[0] = a[0] + a[2]
		t.append('HEAL')
	else:
		b[0] = b[0] - a[1]
		t.append('STRIKE')
	a[0] = a[0] - b[1]
print(len(t))
for x in t:
	print(x)


(h1, a1, c1) = list(map(int, input().split(' ')))
(h2, a2) = list(map(int, input().split(' ')))
if h2 < a1:
	print(1)
	print('STRIKE')
else:
	n = h2 // a1 + (1 if h2 % a1 != 0 else 0)
	ur = h1 - (n - 1) * a2
	if ur >= 0:
		if ur == 0:
			print(n + 1)
			print('HEAL')
		else:
			print(n)
	else:
		ur = -ur
		print(n + (ur // (c1 - a2) + 1))
		for i in range(1 + ur // (c1 - a2)):
			print('HEAL')
	for i in range(n):
		print('STRIKE')


(h1, a1, c1) = [int(x) for x in input().split()]
(h2, a2) = [int(x) for x in input().split()]
c = []
t = h1
while h2 > 0:
	if h2 - a1 <= 0:
		h2 -= a1
		h1 -= a2
		c.append('STRIKE')
		continue
	if h1 - a2 <= 0:
		c.append('HEAL')
		h1 = h1 + c1
		h1 -= a2
		continue
	h2 -= a1
	h1 -= a2
	c.append('STRIKE')
print(len(c))
for x in c:
	print(x)


(h, a, c) = list(map(int, input().split()))
(h2, a2) = list(map(int, input().split()))
count = 1
S = []
while h2 > a:
	count += 1
	if h > a2:
		S.append('STRIKE')
		h2 -= a
	else:
		S.append('HEAL')
		h += c
	h -= a2
S.append('STRIKE')
print(count)
for i in S:
	print(i)


(h1, a1, c1) = list(map(int, input().split()))
(h2, a2) = list(map(int, input().split()))
an = []
while h2 > 0:
	if h2 - a1 <= 0:
		an.append('STRIKE')
		break
	if h1 <= a2:
		h1 += c1
		an.append('HEAL')
	else:
		h2 -= a1
		an.append('STRIKE')
	h1 -= a2
print(len(an))
for i in an:
	print(i)


def main():
	(h1, a1, c1) = map(int, input().split())
	(h2, a2) = map(int, input().split())
	ans = []
	while h2 > 0:
		if h1 - a2 > 0 or h2 - a1 <= 0:
			ans.append('STRIKE')
			h2 -= a1
		else:
			ans.append('HEAL')
			h1 += c1
		if h2 <= 0:
			break
		h1 -= a2
	print(len(ans))
	for x in ans:
		print(x)
main()


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
ans = []
while True:
	if h2 <= a1:
		ans.append('STRIKE')
		break
	if h1 <= a2:
		ans.append('HEAL')
		h1 += c1
		h1 -= a2
	else:
		ans.append('STRIKE')
		h2 -= a1
		h1 -= a2
print(len(ans))
for i in ans:
	print(''.join(i))


read = lambda : list(map(int, input().split()))
(h1, a1, c1) = read()
(h2, a2) = read()
ans = 1
a = []
ap = a.append
while h2 > a1:
	ans += 1
	if h1 > a2:
		h2 -= a1
		ap('STRIKE')
	else:
		h1 += c1
		ap('HEAL')
	h1 -= a2
ap('STRIKE')
print(ans)
print('\n'.join(a))


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
l = []
while h2 > 0:
	if h2 <= a1:
		h2 -= a1
		l.append('STRIKE')
	elif h1 <= a2:
		h1 += c1
		l.append('HEAL')
	else:
		h2 -= a1
		l.append('STRIKE')
	h1 -= a2
print(len(l))
print('\n'.join(l))


from math import ceil
(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())

def strike_number(crab_heal, strike):
	return ceil(crab_heal / strike)

def heal(vova_h, vova_s, c, crab_h, crab_s):
	strikes = strike_number(crab_h, vova_s)
	heals = (crab_s * (strikes - 1) - vova_h) / (c - crab_s)
	if heals == int(heals):
		heals += 1
	elif heals < 0:
		heals = 0
	else:
		heals = ceil(heals)
	print(int(heals + strikes))
	while heals > 0:
		print('HEAL')
		heals -= 1
	while strikes > 0:
		print('STRIKE')
		strikes -= 1
heal(h1, a1, c1, h2, a2)


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
c = 0
l = []
mod = True
while mod:
	x = h2 - a1
	y = h1 - a2
	c += 1
	if x <= 0:
		l.append('STRIKE')
		mod = False
	elif y <= 0:
		h1 -= a2
		h1 += c1
		l.append('HEAL')
	else:
		h2 -= a1
		h1 -= a2
		l.append('STRIKE')
print(c)
for i in l:
	print(i)


import math
(h1, a1, c1) = list(map(int, input().split()))
(h2, a2) = list(map(int, input().split()))
mystrikes = math.ceil(h2 / a1)
opstrikes = math.ceil(h1 / a2)
k = opstrikes - mystrikes
heals = 0
if k >= 0:
	print(mystrikes)
	for i in range(mystrikes):
		print('STRIKE')
else:
	while k < 0:
		h1 = h1 + c1 - a2
		heals += 1
		mystrikes = math.ceil(h2 / a1)
		opstrikes = math.ceil(h1 / a2)
		k = opstrikes - mystrikes
	print(heals + mystrikes)
	for x in range(heals):
		print('HEAL')
	for y in range(mystrikes):
		print('STRIKE')


(a, b, c) = map(int, input().split())
(x, y) = map(int, input().split())
k = []
while x > 0:
	if a - y > 0 or x - b < 1:
		x -= b
		k += ['STRIKE']
		a -= y
	else:
		a += c
		k += ['HEAL']
		a -= y
print(len(k))
for i in k:
	print(i)


(h1, a1, c1) = list(map(int, input().strip().split()))
(h2, a2) = list(map(int, input().strip().split()))
if h2 % a1 == 0:
	potez = h2 // a1
else:
	potez = h2 // a1 + 1
damage = (potez - 1) * a2
potov = 0
while h1 <= damage:
	potov += 1
	h1 += c1 - a2
print(potez + potov)
for _ in range(potov):
	print('HEAL')
for _ in range(potez):
	print('STRIKE')


(h1, a1, c1) = [int(x) for x in input().split()]
(h2, a2) = [int(x) for x in input().split()]
x = h2 // a1 + bool(h2 % a1)
t = max(0, ((x - 1) * a2 - h1) // (c1 - a2) + 1)
print(t + x)
for i in range(t):
	print('HEAL')
for i in range(x):
	print('STRIKE')


from os import path
import sys, time
from math import ceil, floor, gcd, log, log2, factorial
from collections import defaultdict, Counter, deque
from itertools import permutations
maxx = float('inf')
I = lambda : int(sys.stdin.buffer.readline())
tup = lambda : map(int, sys.stdin.buffer.readline().split())
lint = lambda : [int(x) for x in sys.stdin.buffer.readline().split()]
S = lambda : sys.stdin.readline().replace('\n', '').strip()

def grid(r, c):
	return [lint() for i in range(r)]
stpr = lambda x: sys.stdout.write(f'{x}' + '\n')
star = lambda x: print(' '.join(map(str, x)))
localsys = 0
start_time = time.time()
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
(h1, a1, c1) = tup()
(h2, a2) = tup()
cnt = 0
ans = []
while h1 > 0 and h2 > 0:
	if a1 >= h2:
		h2 -= a1
		ans.append('STRIKE')
	elif h1 <= a2:
		h1 += c1
		ans.append('HEAL')
	else:
		h2 -= a1
		ans.append('STRIKE')
	h1 -= a2
print(len(ans))
print(*ans, sep='\n')
if localsys:
	print('\n\nTime Elased :', time.time() - start_time, 'seconds')


(h1, a1, c1) = [int(i) for i in input().split()]
(h2, a2) = [int(i) for i in input().split()]
kol = 0
b = []
while h2 > 0:
	kol += 1
	if h1 - a2 <= 0:
		if h2 - a1 <= 0:
			b.append('STRIKE')
			h2 -= a1
		else:
			h1 += c1
			b.append('HEAL')
	else:
		h2 -= a1
		b.append('STRIKE')
	h1 -= a2
print(kol)
for i in range(kol):
	print(b[i])


import sys
import math
input = sys.stdin.readline
(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
moves = []
attack = True
while h2 > 0:
	if attack:
		if h1 > a2 or a1 >= h2:
			moves.append('STRIKE')
			h2 -= a1
		else:
			moves.append('HEAL')
			h1 += c1
	else:
		h1 -= a2
	attack = not attack
print(len(moves))
[print(moves[i]) for i in range(len(moves))]


out = []
s = input()
s = s.split()
h1 = int(s[0])
a1 = int(s[1])
c1 = int(s[2])
s = input()
s = s.split()
h2 = int(s[0])
a2 = int(s[1])
c = 0
while h2 > 0:
	if h1 - a2 > 0:
		h2 -= a1
		out.append('STRIKE')
	elif h2 - a1 <= 0:
		h2 -= a1
		out.append('STRIKE')
	else:
		h1 += c1
		out.append('HEAL')
	h1 -= a2
	c += 1
print(c)
for i in range(len(out)):
	print(out[i])


vova = [int(a) for a in input().split(' ')]
modcrab = [int(a) for a in input().split(' ')]
vova_health = vova[0]
vova_strike = vova[1]
vova_heal = vova[2]
mod_health = modcrab[0]
mod_strike = modcrab[1]
heal = False
store = []
while mod_health > 0:
	if vova_health - mod_strike < 1:
		if mod_health - vova_strike < 1:
			store.append('STRIKE')
			mod_health -= vova_strike
		else:
			store.append('HEAL')
			vova_health += vova_heal
	else:
		store.append('STRIKE')
		mod_health -= vova_strike
	vova_health -= mod_strike
print(len(store))
for l in store:
	print(l)


v = list(map(int, input().split()))
d = list(map(int, input().split()))
h1 = v[0]
a1 = v[1]
c1 = v[2]
h2 = d[0]
a2 = d[1]
h = 'HEAL\n'
s = 'STRIKE\n'
k = ''
while h2 > 0:
	if h2 <= a1:
		k += s
		h2 -= a1
	elif h1 <= a2:
		k += h
		h1 += c1
	else:
		k += s
		h2 -= a1
	h1 -= a2
print(len(k.split('\n')) - 1)
print(k)


(h1, a1, c1) = [int(i) for i in input().split()]
(h2, a2) = [int(i) for i in input().split()]
n = 0
com = []
while True:
	if h2 <= a1:
		com.append('STRIKE')
		n += 1
		break
	elif h2 > a1 and a2 >= h1:
		com.append('HEAL')
		h1 += c1
		n += 1
	else:
		com.append('STRIKE')
		h2 -= a1
		n += 1
	h1 -= a2
print(n)
for i in com:
	print(i)


import math
(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
a = math.ceil(h1 / a2)
b = math.ceil(h2 / a1)
if b <= a:
	print(b)
	for i in range(b):
		print('STRIKE')
else:
	A = []
	for i in range(a - 1):
		A.append('STRIKE')
	h2 -= (a - 1) * a1
	h1 -= (a - 1) * a2
	while a < b:
		A.append('HEAL')
		h1 += c1
		h1 -= a2
		a = math.ceil(h1 / a2)
		b = math.ceil(h2 / a1)
	for i in range(b):
		A.append('STRIKE')
	print(len(A))
	for i in A:
		print(i)


(h, a, c) = map(int, input().split())
(h2, a2) = map(int, input().split())
res = []
while h2 > 0:
	if h < a2 + 1 and h2 > a:
		res.append('HEAL')
		h += c
	else:
		h2 -= a
		res.append('STRIKE')
	h -= a2
print(len(res))
for i in range(len(res)):
	print(res[i])


(a, b, c) = (int(i) for i in input().split(' '))
(d, e) = (int(i) for i in input().split(' '))
l = []
while d > 0:
	if d - b <= 0:
		l.append('STRIKE')
		break
	if a - e > 0:
		l.append('STRIKE')
		d -= b
		a -= e
	else:
		l.append('HEAL')
		a += c - e
print(len(l))
for i in l:
	print(i)


class Game:
	(h1, a1, c1, h2, a2, count) = (0, 0, 0, 0, 0, 0)
	his = []
	win = False

	def __init__(self, h1, a1, c1, h2, a2):
		self.a1 = a1
		self.h1 = h1
		self.c1 = c1
		self.a2 = a2
		self.h2 = h2

	def kill(self):
		if self.a1 >= self.h2:
			return True
		else:
			return False

	def die(self):
		if self.a2 >= self.h1:
			return True
		else:
			return False

	def attack(self):
		self.h2 = self.h2 - self.a1
		self.his.append('STRIKE')
		self.count += 1
		self.h1 = self.h1 - self.a2

	def heal(self):
		self.h1 = self.h1 + self.c1
		self.his.append('HEAL')
		self.count += 1
		self.h1 = self.h1 - self.a2

	def log_his(self):
		print(self.h1, self.a1, self.h2, self.a2)
(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
game = Game(h1, a1, c1, h2, a2)
while not game.win:
	if game.kill():
		game.attack()
		game.win = True
	elif game.die():
		game.heal()
	else:
		game.attack()
print(game.count)
for i in game.his:
	print(i)


(h1, a1, c1) = input().split(' ')
(h2, a2) = input().split(' ')
h1 = int(h1)
h2 = int(h2)
a1 = int(a1)
a2 = int(a2)
c1 = int(c1)
n = 0
k = []
while h2 > 0:
	if a1 >= h2:
		k.append('STRIKE')
		n += 1
		h2 = 0
	elif a2 >= h1 and a1 < h2:
		k.append('HEAL')
		n += 1
		h1 = c1 + h1 - a2
	else:
		k.append('STRIKE')
		n += 1
		h2 = h2 - a1
		h1 -= a2
print(n)
cc = len(k)
for i in range(0, cc):
	print(k[i])


(vh, vp, c) = map(int, input().split())
(mh, mp) = map(int, input().split())
l = []
while mh > 0:
	if vh > mp or vp >= mh:
		l.append('STRIKE')
		vh -= mp
		mh -= vp
	else:
		vh += c - mp
		l.append('HEAL')
print(len(l))
for i in l:
	print(i)


(h1, a1, c1) = [int(i) for i in input().split()]
(h2, a2) = [int(i) for i in input().split()]
n = 0
a = []
while h2 > 0:
	if h2 <= a1:
		a.append('STRIKE')
		h2 -= a1
	else:
		if h1 > a2:
			a.append('STRIKE')
			h2 -= a1
		else:
			a.append('HEAL')
			h1 += c1
		if h2 > 0:
			h1 -= a2
	n += 1
print(n)
for i in a:
	print(i)


v = list(map(int, input().split()))
e = list(map(int, input().split()))
k = []
c = 0
while e[0] > 0:
	c += 1
	if e[0] - v[1] <= 0:
		k.append('STRIKE')
		e[0] -= v[1]
		break
	if v[0] - e[1] <= 0:
		k.append('HEAL')
		v[0] = v[0] + v[2] - e[1]
	else:
		k.append('STRIKE')
		e[0] -= v[1]
		v[0] -= e[1]
print(c)
for y in k:
	print(y)


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
ans = []
while h2 > 0:
	if h1 > a2 or a1 >= h2:
		h2 -= a1
		ans.append(True)
	else:
		h1 += c1
		ans.append(False)
	h1 -= a2
print(len(ans))
for it in ans:
	if it:
		print('STRIKE')
	else:
		print('HEAL')
ans.clear()


import sys
(h, a, c) = map(int, input().split())
(n, m) = map(int, input().split())
s = []
while n > 0:
	if h > m:
		s.append('STRIKE')
		h -= m
		n -= a
	elif n - a <= 0:
		s.append('STRIKE')
		n -= a
	else:
		s.append('HEAL')
		h = h - m + c
print(len(s))
for i in s:
	print(i)


(h, a, c) = map(int, input().split())
(n, b) = map(int, input().split())
from math import ceil
x = ceil(n / a)
h -= b * (x - 1)
k = x
kh = 0
while h <= 0:
	h += c - b
	kh += 1
print(kh + k)
for i in range(kh):
	print('HEAL')
for i in range(k):
	print('STRIKE')


import math
(h1, a1, c1) = map(int, input().split(' '))
(h2, a2) = map(int, input().split(' '))
cnt = 0
l = []
while h2 > 0:
	if h1 <= a2 and h2 > a1:
		h1 += c1 - a2
		l.append(0)
	else:
		h2 -= a1
		h1 -= a2
		l.append(1)
	cnt += 1
print(cnt)
for j in range(0, cnt):
	if l[j] == 0:
		print('HEAL')
	else:
		print('STRIKE')


l = list(map(int, input().split()))
l1 = list(map(int, input().split()))
k = 0
S = ''
while l1[0] > 0:
	k += 1
	if l1[0] - l[1] <= 0:
		S += 'STRIKE' + '\n'
		break
	if l[0] - l1[1] <= 0:
		S += 'HEAL' + '\n'
		l[0] = l[0] + l[2]
	else:
		l1[0] = l1[0] - l[1]
		S += 'STRIKE' + '\n'
	l[0] -= l1[1]
print(k)
print(S)


import bisect

def list_output(s):
	print(' '.join(map(str, s)))

def list_input(s='int'):
	if s == 'int':
		return list(map(int, input().split()))
	elif s == 'float':
		return list(map(float, input().split()))
	return list(map(str, input().split()))
[h1, a1, c1] = list(map(int, input().split()))
[h2, a2] = list(map(int, input().split()))
res = list()
while True:
	if h2 <= a1:
		res.append('STRIKE')
		break
	if h1 > a2:
		res.append('STRIKE')
		h2 -= a1
		h1 -= a2
	else:
		res.append('HEAL')
		h1 += c1
		h1 -= a2
	if h2 <= 0:
		break
print(len(res))
for e in res:
	print(e)


vova = input().split()
gk = input().split()
h1 = int(vova[0])
a1 = int(vova[1])
c1 = int(vova[2])
h2 = int(gk[0])
a2 = int(gk[1])
hp1 = h1
hp2 = h2
count = 0
a = []
while hp2 > 0:
	if hp1 <= a2 and hp2 > a1:
		count += 1
		hp1 += c1
		a.append('HEAL')
	else:
		count += 1
		hp2 -= a1
		a.append('STRIKE')
	hp1 -= a2
print(count)
for i in a:
	print(i)


import math
inp = input().split(' ')
health = int(inp[0])
attack = int(inp[1])
potion = int(inp[2])
inp = input().split(' ')
monsterhealth = int(inp[0])
monsterattack = int(inp[1])
attacksneeded = math.ceil(monsterhealth / attack)
healsneeded = 0
while healsneeded * potion + health <= monsterattack * (attacksneeded - 1 + healsneeded):
	healsneeded = healsneeded + 1
print(healsneeded + attacksneeded)
for i in range(0, healsneeded):
	print('HEAL')
for i in range(0, attacksneeded):
	print('STRIKE')


from math import ceil
[h1, a1, c1] = input().split(' ')
[h2, a2] = input().split(' ')
h1 = int(h1)
a1 = int(a1)
c1 = int(c1)
h2 = int(h2)
a2 = int(a2)
t = 0
s = []
while h2 > 0:
	if a1 >= h2:
		t += 1
		s.append('STRIKE')
		h2 = 0
	elif h1 <= a2:
		h1 = h1 + c1 - a2
		t += 1
		s.append('HEAL')
	else:
		h1 = h1 - a2
		h2 = h2 - a1
		t += 1
		s.append('STRIKE')
print(t)
for i in s:
	print(i)


(h1, a1, c1) = [int(x) for x in input().split()]
(h2, a2) = [int(x) for x in input().split()]
n_rounds = 0
things_to_do = []
while h2 > 0:
	n_rounds += 1
	if h2 <= a1 or h1 > a2:
		things_to_do.append('STRIKE')
		h2 -= a1
		h1 -= a2
	else:
		things_to_do.append('HEAL')
		h1 += c1
		h1 -= a2
print(n_rounds)
for i in things_to_do:
	print(i)


from math import ceil
(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
for i in range(100000):
	if ceil((h1 + i * (c1 - a2)) / a2) >= ceil(h2 / a1):
		print(i + int(ceil(h2 / a1)))
		for j in range(i):
			print('HEAL')
		for j in range(int(ceil(h2 / a1))):
			print('STRIKE')
		break


(n, m, k) = map(int, input().split())
(n1, m1) = map(int, input().split())
ans = []
while n1 > 0:
	if m >= n1:
		ans.append('STRIKE')
		n1 -= m
	elif n <= m1:
		ans.append('HEAL')
		n += k - m1
	else:
		ans.append('STRIKE')
		n1 -= m
		n -= m1
print(len(ans))
for i in ans:
	print(i)


(h, a, c) = input().split(' ')
(m, x) = input().split(' ')
h = int(h)
a = int(a)
c = int(c)
m = int(m)
x = int(x)
r = 0
y = 0
while m:
	if m - a <= 0:
		r += 1
		break
	elif h < x + 1:
		h += c
		y += 1
	else:
		m -= a
		r += 1
	if m > 0:
		h -= x
print(r + y)
for i in range(y):
	print('HEAL')
for i in range(r):
	print('STRIKE')


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
a = []
for i in range(10 ** 9):
	if h2 <= a1:
		a.append('STRIKE')
		break
	h1 -= a2
	if h1 <= 0:
		a.append('HEAL')
		h1 += c1
	else:
		a.append('STRIKE')
		h2 -= a1
print(i + 1)
for j in range(i + 1):
	print(a[j])


from math import *
(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
s = []
count = 0
while h2 > 0:
	if (h2 - a1 <= 0) | (h1 - a2 > 0):
		h2 -= a1
		s.append('STRIKE')
	else:
		h1 += c1
		s.append('HEAL')
	h1 -= a2
	count += 1
print(count)
for i in range(len(s)):
	print(s[i], sep='/n')


(h1, a1, c1) = [int(val) for val in input().split(' ')]
(h2, a2) = [int(val) for val in input().split(' ')]
n = 0
actions = []
while h2 > 0:
	n += 1
	if h2 - a1 <= 0:
		actions.append(1)
		h2 -= a1
		break
	if h1 - a2 <= 0:
		actions.append(0)
		h1 += c1
	else:
		actions.append(1)
		h2 -= a1
	h1 -= a2
print(n)
for action in actions:
	if action == 0:
		print('HEAL')
	else:
		print('STRIKE')


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
import math

def fact(x):
	if x == 0:
		return 1
	else:
		return x * fact(x - 1)

def lower_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] >= num:
			answer = middle
			end = middle - 1
		else:
			start = middle + 1
	return answer

def upper_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] <= num:
			answer = middle
			start = middle + 1
		else:
			end = middle - 1
	return answer

def abs(x):
	return x if x >= 0 else -x

def binary_search(li, val, lb, ub):
	ans = 0
	while lb <= ub:
		mid = (lb + ub) // 2
		if li[mid] > val:
			ub = mid - 1
		elif val > li[mid]:
			lb = mid + 1
		else:
			ans = 1
			break
	return ans
(h1, a1, c1) = list(map(int, input().split()))
(h2, a2) = list(map(int, input().split()))
cnt = 0
li = []
while True:
	if h2 <= a1:
		li.append('STRIKE')
		cnt += 1
		break
	elif h1 <= a2:
		li.append('HEAL')
		h1 += c1
		h1 -= a2
		cnt += 1
	else:
		li.append('STRIKE')
		h2 -= a1
		h1 -= a2
		cnt += 1
print(cnt)
for i in range(cnt):
	print(li[i])


import math
(h1, a1, c1) = [int(i) for i in input().split()]
(h2, a2) = [int(i) for i in input().split()]
if math.ceil(h2 / a1) <= math.ceil(h1 / a2):
	print(math.ceil(h2 / a1))
	for i in range(math.ceil(h2 / a1)):
		print('STRIKE')
	exit()
c1 -= a2
n = (math.ceil(h2 / a1) - 1) * a2 + 1
ans = math.ceil((n - h1) / c1)
print(ans + math.ceil(h2 / a1))
for i in range(ans):
	print('HEAL')
for i in range(math.ceil(h2 / a1)):
	print('STRIKE')


import sys
import string
from collections import Counter, defaultdict
from math import fsum, sqrt, gcd, ceil, factorial
from operator import *
from itertools import accumulate
inf = float('inf')
flush = lambda : sys.stdout.flush
comb = lambda x, y: factorial(x) // factorial(y) // factorial(x - y)
ip = lambda : input()
ii = lambda : int(input())
r = lambda : map(int, input().split())
rr = lambda : list(r())
(a, b, c) = r()
(x, y) = r()
ans = []
while a > 0 and x > 0:
	if a <= y and x > b:
		ans += ('HEAL',)
		a += c
	else:
		ans += ('STRIKE',)
		x -= b
	a -= y
print(len(ans))
print(*ans, sep='\n')


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
ans = 0
s = []
while h2 > 0:
	if h2 - a1 <= 0:
		s.append('STRIKE')
		h2 -= a1
	else:
		if h1 > a2:
			s.append('STRIKE')
			h2 -= a1
		else:
			s.append('HEAL')
			h1 += c1
		if h2 > 0:
			h1 -= a2
	ans += 1
print(ans)
print(*s, sep='\n')


numbers = [int(n) for n in input().split()]
(h1, a1, c1) = numbers
numbers2 = [int(n) for n in input().split()]
(h2, a2) = numbers2
count = 0
while h2 > 0:
	count += 1
	if h2 - a1 <= 0:
		h2 -= a1
		continue
	if h1 - a2 > 0:
		h1 -= a2
		h2 -= a1
	else:
		h1 += c1 - a2
print(count)
(h1, a1, c1) = numbers
(h2, a2) = numbers2
while h2 > 0:
	if h2 - a1 <= 0:
		print('STRIKE')
		h2 -= a1
		continue
	if h1 - a2 > 0:
		print('STRIKE')
		h1 -= a2
		h2 -= a1
	else:
		print('HEAL')
		h1 += c1 - a2


import sys
(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
ans = []
while h2 > 0:
	if h1 - a2 <= 0 and h2 - a1 > 0:
		ans.append('HEAL')
		h1 += c1
	else:
		ans.append('STRIKE')
		h2 -= a1
	h1 -= a2
print(len(ans))
for i in range(len(ans)):
	print(ans[i])


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
rounds = 0
log = []
while h2 > 0:
	if h2 <= a1:
		log.append('STRIKE')
		h2 -= a1
	elif h1 > a2:
		h2 -= a1
		log.append('STRIKE')
	else:
		h1 += c1
		log.append('HEAL')
	h1 -= a2
	rounds += 1
print(rounds)
for l in log:
	print(l)


(myhealth, mypower, myhealer) = [int(x) for x in input().split()]
(oHealth, oPower) = [int(x) for x in input().split()]
res = []
while oHealth > 0:
	if myhealth <= oPower and oHealth > mypower:
		myhealth += myhealer - oPower
		res.append('HEAL')
	else:
		res.append('STRIKE')
		oHealth -= mypower
		myhealth -= oPower
print(len(res))
print(*res, sep='\n')


(h1, a1, c1) = input().split(' ')
(h2, a2) = input().split(' ')
a1 = int(a1)
a2 = int(a2)
h1 = int(h1)
h2 = int(h2)
c1 = int(c1)
L = []
while h2 > 0:
	if h1 - a2 > 0 or h2 - a1 <= 0:
		L.append('STRIKE')
		h2 -= a1
	else:
		L.append('HEAL')
		h1 += c1
	h1 -= a2
print(len(L))
for i in L:
	print(i, '\n')


import math
(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
ans = []
while h2 > 0:
	h1 -= a2
	h2 -= a1
	if h1 <= 0 and h2 > 0:
		ans.append('HEAL')
		h2 += a1
		h1 += c1
	else:
		ans.append('STRIKE')
print(len(ans))
for v in ans:
	print(v)


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
step = []
while True:
	if a1 >= h2:
		step.append('STRIKE')
		break
	if a2 >= h1:
		step.append('HEAL')
		h1 += c1
	else:
		step.append('STRIKE')
		h2 -= a1
	h1 -= a2
	if h2 <= 0:
		break
print(len(step))
for i in step:
	print(i)


(a, b, c) = input().split()
(a, b, c) = (int(a), int(b), int(c))
(d, e) = input().split()
(d, e) = (int(d), int(e))
f = []
while d > 0:
	if a > e or d - b <= 0:
		d = d - b
		f.append('STRIKE')
	else:
		a = a + c
		f.append('HEAL')
	if d > 0:
		a = a - e
print(len(f))
for i in range(len(f)):
	print(f[i])


def main():
	(h1, a1, c1) = map(int, input().strip().split())
	(h2, a2) = map(int, input().strip().split())
	while h2 > 0:
		if a1 >= h2:
			phase.append('STRIKE')
			break
		if h1 > a2:
			h2 = strike(a1, h2)
		else:
			h1 = heal(h1, c1)
		h1 = h1 - a2
	print(len(phase))
	for i in phase:
		print(i)

def strike(a1, h2):
	phase.append('STRIKE')
	h2 = h2 - a1
	return h2

def heal(h1, c1):
	phase.append('HEAL')
	h1 = h1 + c1
	return h1
phase = []
main()


(h_1, a_1, c_1) = map(int, input().split())
(h_2, a_2) = map(int, input().split())
strike = h_2 // a_1 + (1 if h_2 % a_1 != 0 else 0)
heal = -(h_1 - a_2 * (strike - 1)) // (c_1 - a_2) + 1 if a_2 * (strike - 1) >= h_1 else 0
print(heal + strike)
print('\n'.join(['HEAL'] * heal + ['STRIKE'] * strike))


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
data = []
while h2 > 0:
	if h1 > a2 or a1 >= h2:
		h2 -= a1
		data.append('STRIKE')
	else:
		h1 += c1
		data.append('HEAL')
	h1 -= a2
print(len(data))
for item in data:
	print(item)


(h1, a1, c1) = [int(a) for a in input().strip().split()]
(h2, a2) = [int(a) for a in input().strip().split()]
result = []
while h2 > a1:
	if h1 > a2:
		h2 = h2 - a1
		h1 = h1 - a2
		result.append(1)
	else:
		h1 = h1 + c1
		h1 = h1 - a2
		result.append(0)
if h2 > 0:
	print(str(len(result) + 1))
	for i in range(len(result)):
		if result[i] == 1:
			print('STRIKE')
		else:
			print('HEAL')
	print('STRIKE')
else:
	print(str(len(result)))
	for i in range(len(result)):
		if result[i] == 1:
			print('STRIKE')
		else:
			print('HEAL')


tokens = input().split()
h1 = int(tokens[0])
a1 = int(tokens[1])
c1 = int(tokens[2])
tokens = input().split()
h2 = int(tokens[0])
a2 = int(tokens[1])
cnt = 0
actions = []
if h2 / a1 < h1 / a2:
	while h2 > 0:
		h2 -= a1
		cnt += 1
		actions.append('STRIKE')
while h2 > 0:
	if h2 - a1 <= 0:
		actions.append('STRIKE')
		h2 -= a1
	elif h1 - a2 <= 0:
		actions.append('HEAL')
		h1 += c1
	else:
		actions.append('STRIKE')
		h2 -= a1
	h1 -= a2
	cnt += 1
print(cnt)
for x in actions:
	print(x)


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
listOutput = []
st = 'STRIKE'
he = 'HEAL'
nb = 0
while h2 > 0:
	if h1 - a2 > 0 or h2 - a1 <= 0:
		nb += 1
		listOutput.append(st)
		h1 -= a2
		h2 -= a1
	else:
		nb += 1
		listOutput.append(he)
		h1 += c1 - a2
print(str(nb))
print('\n'.join(listOutput))


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
coms = []
while h2 > 0:
	if h2 <= a1:
		coms.append('STRIKE')
		h2 -= a1
	elif h1 <= a2:
		coms.append('HEAL')
		h1 += c1
	else:
		coms.append('STRIKE')
		h2 -= a1
	h1 -= a2
print(len(coms))
print(*coms, sep='\n')


(h1, a1, c1) = list(map(int, input().strip().split()))
(h2, a2) = list(map(int, input().strip().split()))
answer = []
count = 0
while h2 > 0:
	if a1 >= h2:
		answer.append('STRIKE')
		h2 -= a1
	elif a2 >= h1:
		answer.append('HEAL')
		h1 += c1
		h1 -= a2
	else:
		answer.append('STRIKE')
		h2 -= a1
		h1 -= a2
	count += 1
print(count)
for i in answer:
	print(i)


(h1, a1, c1) = [int(num) for num in input().strip().split()]
(h2, a2) = [int(num) for num in input().strip().split()]
ans = []
while h2 > 0:
	if h2 <= a1:
		h2 -= a1
		ans.append('STRIKE')
	elif h1 <= a2:
		h1 += c1
		ans.append('HEAL')
	else:
		h2 -= a1
		ans.append('STRIKE')
	h1 -= a2
print(len(ans))
for val in ans:
	print(val)


(h1, a1, c) = map(int, input().split())
(h2, a2) = map(int, input().split())
i = 0
l = []
while h2 > 0:
	if a2 >= h1 and a1 < h2:
		h1 += c
		l.append('HEAL')
	else:
		h2 -= a1
		l.append('STRIKE')
	if h2 > 0:
		h1 -= a2
	i += 1
print(i)
for i in range(i):
	print(l[i])


R = lambda : map(int, input().split())
(h, a, c) = R()
(g, b) = R()
k = (g + a - 1) // a
n = max(b * (k - 1) - h, -1) // (c - b) + 1
print(str(n + k) + '\nHEAL' * n + '\nSTRIKE' * k)


(h1, a1, c) = list(map(int, input().split()))
(h2, a2) = list(map(int, input().split()))
turn = 0
l = list()
while h1 > 0 and h2 > 0:
	if turn % 2 == 0:
		if h1 > a2 or h2 <= a1:
			l.append('STRIKE')
			h2 -= a1
		else:
			l.append('HEAL')
			h1 += c
	else:
		h1 -= a2
	turn += 1
print(len(l))
print('\n'.join(l))


(h1, a1, c1) = [int(x) for x in input().split(' ')]
(h2, a2) = [int(x) for x in input().split(' ')]
act = []
cnt = 0
while h2 > 0:
	if h2 <= a1:
		act.append(1)
		h2 -= a1
		h1 -= a2
	elif h1 > a2:
		act.append(1)
		h2 -= a1
		h1 -= a2
	else:
		act.append(0)
		h1 -= a2
		h1 += c1
	cnt += 1
print(cnt)
for i in act:
	if i == 0:
		print('HEAL')
	else:
		print('STRIKE')


import math
h = [0, 0]
a = [0, 0]
c = 0
(h[0], a[0], c) = map(int, input().strip().split())
(h[1], a[1]) = map(int, input().strip().split())
res = []
count = 0
while h[1] > 0:
	if h[0] > a[1] or (h[0] <= a[1] and h[1] <= a[0]):
		res.append('STRIKE')
		h[1] -= a[0]
	else:
		res.append('HEAL')
		h[0] += c
	h[0] -= a[1]
	count += 1
print(str(count))
for item in res:
	print(item)


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
res = []
while h2 > 0:
	if h1 > a2 or h2 <= a1:
		res.append('STRIKE')
		h2 -= a1
		h1 -= a2
	else:
		res.append('HEAL')
		h1 += c1
		h1 -= a2
print(len(res))
print(*res, sep='\n')


(n, m, k) = map(int, input().split())
(h, d) = map(int, input().split())
a = []
l = 0
while h > 0:
	if n > d or h <= m:
		h -= m
		a.append('STRIKE')
	else:
		n += k
		a.append('HEAL')
	l += 1
	n -= d
print(l)
print('\n'.join(a))


V = [int(i) for i in input().split()]
gr = [int(i) for i in input().split()]
n = 0
ans = []
while gr[0] > 0:
	if gr[0] - V[1] <= 0:
		ans.append('STRIKE')
		gr[0] -= V[1]
		n += 1
	elif V[0] - gr[1] > 0:
		gr[0] -= V[1]
		V[0] -= gr[1]
		ans.append('STRIKE')
		n += 1
	else:
		V[0] += V[2]
		ans.append('HEAL')
		V[0] -= gr[1]
		n += 1
print(n)
for i in range(len(ans)):
	print(ans[i])


import sys
import math
(h1, a1, c1) = map(int, sys.stdin.readline().split(' '))
(h2, a2) = map(int, sys.stdin.readline().split(' '))
i = 0
arr = []
while True:
	if h2 <= 0:
		break
	i += 1
	if h1 - a2 > 0 or h2 - a1 <= 0:
		arr.append('STRIKE')
		h2 = h2 - a1
	else:
		h1 += c1
		arr.append('HEAL')
	h1 -= a2
print(i)
for i in arr:
	print(i)


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
hpt = c1 - a2
time_to_kill = (h2 + (a1 - 1)) // a1
damage_taken = a2 * (time_to_kill - 1)
required_excess = max(0, damage_taken - h1 + 1)
required_heals = (required_excess + (hpt - 1)) // hpt
n = required_heals + time_to_kill
print(n)
for _ in range(required_heals):
	print('HEAL')
for _ in range(time_to_kill):
	print('STRIKE')


def solve():
	(h1, a1, c1) = get([int])
	(h2, a2) = get([int])
	ans = []
	while h2 > 0:
		if h2 - a1 <= 0:
			ans.append('STRIKE')
			h2 -= a1
		elif h1 - a2 <= 0:
			ans.append('HEAL')
			h1 += c1 - a2
		else:
			ans.append('STRIKE')
			h2 -= a1
			h1 -= a2
	return '\n'.join([str(len(ans))] + ans)
_testcases = '\n10 6 100\n17 5\n\n4\nSTRIKE\nHEAL\nSTRIKE\nSTRIKE\n\n\n11 6 100\n12 5\n\n2\nSTRIKE\nSTRIKE\n\n1 1 100\n100 99\n\nA\n'.strip()
from bisect import bisect_left, bisect_right
from functools import lru_cache
from heapq import heapify, heappop, heappush
from operator import itemgetter, attrgetter
import bisect
import collections
import functools
import heapq
import itertools
import math
import operator
import re
import string
import sys
inf = float('inf')
cache = lru_cache(None)
sys.setrecursionlimit(10000)

def tree():
	return collections.defaultdict(tree)

def equal(x, y, epsilon=1e-06):
	if -epsilon <= x - y <= epsilon:
		return True
	if -epsilon <= x <= epsilon or -epsilon <= y <= epsilon:
		return False
	return -epsilon <= (x - y) / x <= epsilon or -epsilon <= (x - y) / y <= epsilon

def get(_type):
	if type(_type) == list:
		if len(_type) == 1:
			_type = _type[0]
			return list(map(_type, input().strip().split()))
		else:
			return [_type[i](inp) for (i, inp) in enumerate(input().strip().split())]
	else:
		return _type(input().strip())
printRecursionTree = timeit = lambda x: x
(_p, print) = (print, lambda *a, **b: None)
_p(solve())


(my_health, my_attack, my_potion) = [int(x) for x in input().split()]
(boss_health, boss_attack) = [int(x) for x in input().split()]
actions = []
while boss_health > 0:
	if my_health <= boss_attack and boss_health > my_attack:
		actions.append('HEAL')
		my_health += my_potion
	else:
		actions.append('STRIKE')
		boss_health -= my_attack
		if boss_health <= 0:
			break
	my_health -= boss_attack
print(len(actions))
print('\n'.join(actions))


a = list(map(int, input().split()))
b = list(map(int, input().split()))
n = 0
s = []
h1 = a[0]
a1 = a[1]
c1 = a[2]
h2 = b[0]
a2 = b[1]
while h2 > 0:
	if h2 > a1 and h1 <= a2:
		s.append(0)
		n += 1
		h1 += c1
		h1 -= a2
	elif h1 > a2 or h2 <= a1:
		s.append(1)
		n += 1
		h2 -= a1
		h1 -= a2
print(n)
for i in range(n):
	if s[i] == 0:
		print('HEAL')
	else:
		print('STRIKE')


import math
a = [int(j) for j in input().split()]
b = [int(j) for j in input().split()]
c = math.ceil(b[0] / a[1])
d = ((c - 1) * b[1] - a[0]) / (a[2] - b[1])
if d < 0:
	d = 0
elif d == math.ceil(d):
	d = int(d + 1)
else:
	d = math.ceil(d)
print(c + d)
for k in range(d):
	print('HEAL')
for k in range(c):
	print('STRIKE')


(h1, a1, c1) = [int(i) for i in input().split()]
(h2, a2) = [int(i) for i in input().split()]
if h2 < a1:
	h2 = a1
attacks = h2 // a1 + (1 if h2 % a1 != 0 else 0)
ln = a2 * (attacks - 1) + 1
if ln <= h1:
	print(attacks)
	for i in range(attacks):
		print('STRIKE')
else:
	heals = (ln - h1) // (c1 - a2) + (1 if (ln - h1) % (c1 - a2) != 0 else 0)
	print(attacks + heals)
	for i in range(heals):
		print('HEAL')
	for i in range(attacks):
		print('STRIKE')


(life, attack, heal) = map(int, input().split())
(ml, ma) = map(int, input().split())
ans = ''
count = 0
while ml > 0:
	if life <= ma and ml > attack:
		life += heal
		ans += 'HEAL\n'
	else:
		ml -= attack
		ans += 'STRIKE\n'
	life -= ma
	count += 1
ans = str(count) + '\n' + ans
print(ans)


(h1, a1, c1) = list(map(int, input().split()))
(h2, a2) = list(map(int, input().split()))
battle_plan = []
while True:
	if h1 > a2 or h2 <= a1:
		battle_plan.append('STRIKE')
		h2 -= a1
	else:
		battle_plan.append('HEAL')
		h1 += c1
	if h2 <= 0:
		break
	h1 -= a2
print(len(battle_plan))
for action in battle_plan:
	print(action)


(h1, a1, c1) = [int(i) for i in input().split()]
(h2, a2) = [int(i) for i in input().split()]
moves = []
cnt = 0
while h2 > 0:
	if h2 - a1 <= 0:
		moves.append('STRIKE')
		cnt += 1
		break
	if h1 - a2 <= 0:
		h1 += c1
		moves.append('HEAL')
	else:
		h2 -= a1
		moves.append('STRIKE')
	h1 -= a2
	cnt += 1
print(cnt)
for i in range(cnt):
	print(moves[i])


s = input().split()
h1 = int(s[0])
a1 = int(s[1])
c1 = int(s[2])
s = input().split()
h2 = int(s[0])
a2 = int(s[1])
boo = []
ans = 0
while h2 > 0:
	if h1 - a2 > 0 or h2 - a1 <= 0:
		boo.append(True)
		h2 = h2 - a1
		h1 = h1 - a2
		ans += 1
	else:
		boo.append(False)
		h1 = h1 + c1 - a2
		ans += 1
print(ans)
for i in range(ans):
	if boo[i]:
		print('STRIKE')
	else:
		print('HEAL')


I = lambda : map(int, input().split())
(h1, a1, c1) = I()
(h2, a2) = I()
moves = []
while h1 > 0 and h2 > 0:
	if a1 >= h2 or h1 > a2:
		moves.append('STRIKE')
		h2 -= a1
		h1 -= a2
	else:
		moves.append('HEAL')
		h1 += c1 - a2
print(len(moves))
print(*moves, sep='\n')


(L1, A1, H1) = map(int, input().split())
(L2, A2) = map(int, input().split())
ans = []
c = 0
while L2 > 0:
	if L1 - A2 > 0:
		ans.append('STRIKE')
		L2 -= A1
	elif L2 - A1 <= 0:
		ans.append('STRIKE')
		c += 1
		break
	else:
		ans.append('HEAL')
		L1 += H1
	c += 1
	L1 -= A2
print(c)
for i in range(c):
	print(ans[i])


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
strikes_num = (h2 + a1 - 1) // a1
if strikes_num == 1:
	print('1\nSTRIKE')
	quit()
hmax = a2 * (strikes_num - 1) + 1
hmax -= h1
hmax = max(hmax, 0)
heal = c1 - a2
heal_num = (hmax + heal - 1) // heal
print(strikes_num + heal_num, '\nHEAL' * heal_num, '\nSTRIKE' * strikes_num, sep='')


(hv, av, cv) = map(int, input().split())
(hm, am) = map(int, input().split())
n = 0
s = []
while hm > 0:
	if av >= hm:
		hm = 0
		s.append('STRIKE')
		n += 1
	elif hv > am:
		s.append('STRIKE')
		n += 1
		hm -= av
	else:
		s.append('HEAL')
		hv += cv
		n += 1
	hv -= am
print(n)
for a in range(0, n):
	print(s[a])


(h, a, c) = [int(x) for x in input().split()]
(hx, ax) = [int(x) for x in input().split()]
count = 0
moves = []
while True:
	if hx <= 0:
		break
	elif h <= ax and hx > a:
		moves.append('HEAL')
		h += c
		h -= ax
	elif h <= ax:
		moves.append('STRIKE')
		count += 1
		break
	else:
		moves.append('STRIKE')
		hx -= a
		h -= ax
	count += 1
print(count)
print(*moves, sep='\n')


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
h1_remain = h1
h2_remain = h2
record_list = []
while h2_remain > 0:
	if a2 >= h1_remain:
		if a1 >= h2_remain:
			record_list.append('STRIKE')
			h2_remain -= a1
		else:
			record_list.append('HEAL')
			h1_remain += c1
			h1_remain -= a2
	else:
		record_list.append('STRIKE')
		h2_remain -= a1
		h1_remain -= a2
print(len(record_list))
for i in record_list:
	print(i)


import math
(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
moves = []
count = 0
while h1:
	if h2 <= a1:
		moves.append('STRIKE')
		break
	if a2 >= h1:
		h1 += c1
		moves.append('HEAL')
	else:
		h2 -= a1
		moves.append('STRIKE')
	h1 -= a2
print(len(moves))
for element in moves:
	print(element)


def lInt(d=None):
	return map(int, input().split(d))
(h1, a1, c1, *_) = lInt()
(h2, a2, *_) = lInt()
g = []
while h2 > 0:
	if h1 > a2 or h2 - a1 <= 0:
		h2 -= a1
		g.append('STRIKE')
	else:
		h1 += c1
		g.append('HEAL')
	h1 -= a2
print(len(g))
for s in g:
	print(s)


(a, b, c) = map(int, input().split())
(x, y) = map(int, input().split())
z = 0
q = 0
m = []
while True:
	a -= y
	if a <= 0:
		m.append('HEAL')
		a += c
	else:
		m.append('STRIKE')
		z += b
	if z >= x:
		break
while m[len(m) - 2] == 'HEAL':
	m.pop(len(m) - 2)
print(len(m))
for i in range(0, len(m)):
	print(m[i])


s1 = input()
s2 = input()
h1 = int(s1.split()[0])
a1 = int(s1.split()[1])
c = int(s1.split()[2])
h2 = int(s2.split()[0])
a2 = int(s2.split()[1])
count = 0
res = []
while h2 > 0:
	if h1 - a2 <= 0 and h2 - a1 > 0:
		h1 += c
		res.append('HEAL')
		h1 = h1 - a2
	else:
		h2 = h2 - a1
		res.append('STRIKE')
		h1 = h1 - a2
	count += 1
print(count)
for i in res:
	print(i)


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
ans = []
while h2 > 0:
	if h1 <= a2 and h2 > a1:
		ans.append('HEAL')
		h1 += c1
	else:
		h2 -= a1
		ans.append('STRIKE')
	h1 -= a2
print(len(ans), *ans, sep='\n')


import math
(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
lst = []
k = 0
while h2 > 0:
	if a1 >= h2:
		h2 -= a1
		lst.append(True)
		k += 1
		break
	while h1 <= a2:
		lst.append(False)
		k += 1
		h1 += c1 - a2
	lst.append(True)
	k += 1
	h1 -= a2
	h2 -= a1
print(k)
for x in lst:
	if x:
		print('STRIKE')
	else:
		print('HEAL')


(h1, a1, c1) = list(map(int, input().split()))
(h2, a2) = list(map(int, input().split()))
n = 0
l = []
while h2 > 0:
	n += 1
	if h2 - a1 <= 0:
		l.append(1)
		break
	if h1 - a2 <= 0:
		l.append(0)
		h1 += c1
		h1 -= a2
		continue
	else:
		l.append(1)
		h1 -= a2
		h2 -= a1
print(n)
for i in l:
	if i == 0:
		print('HEAL')
	else:
		print('STRIKE')


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
arr = []
number = 0
while h2 > 0:
	number += 1
	if h2 <= a1:
		arr.append('STRIKE')
		break
	else:
		if a2 >= h1:
			arr.append('HEAL')
			h1 += c1
		else:
			arr.append('STRIKE')
			h2 -= a1
		h1 -= a2
print(number)
length = len(arr)
for i in range(0, length):
	print(arr[i])


import sys

def main():
	(h1, a1, c1) = map(int, input().split())
	(h2, a2) = map(int, input().split())
	vova_hits = h2 // a1 + int(h2 % a1 != 0)
	monster_hits = max(vova_hits - 1, 0)
	recover_cnt = 0
	while h1 + recover_cnt * c1 <= a2 * (monster_hits + recover_cnt):
		recover_cnt += 1
	print(vova_hits + recover_cnt)
	print('\n'.join(('HEAL' for _ in range(recover_cnt))))
	print('\n'.join(('STRIKE' for _ in range(vova_hits))))
main()


import os
import sys
from io import BytesIO, IOBase
import math
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
ans = []
while h2 > 0:
	if a2 < h1 or h2 - a1 <= 0:
		ans.append('STRIKE')
		h2 -= a1
		h1 -= a2
	else:
		ans.append('HEAL')
		h1 += c1
		h1 -= a2
print(len(ans))
for i in range(len(ans)):
	print(ans[i])


def main(Hv, Av, Cv, Hk, Ak):
	out = [0]
	while Hk > 0:
		while Hv > Ak and Hk > 0:
			Hk -= Av
			if Hk <= 0:
				out.append('STRIKE')
				out[0] += 1
				break
			Hv -= Ak
			out.append('STRIKE')
			out[0] += 1
		if Hk <= 0:
			return out
		elif Hk <= Av:
			out.append('STRIKE')
			out[0] += 1
			break
		else:
			out[0] += 1
			out.append('HEAL')
			Hv += Cv
			Hv -= Ak
	return out
(Hv, Av, Cv) = map(int, input().split())
(Hk, Ak) = map(int, input().split())
print(*main(Hv, Av, Cv, Hk, Ak), sep='\n')


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
k1 = (h2 - 1) // a1 + 1
k2 = (h1 - 1) // a2 + 1
if k1 <= k2:
	print(k1)
	for i in range(k1):
		print('STRIKE')
else:
	D = []
	while h2 > 0:
		if h2 - a1 <= 0:
			h2 -= a1
			D.append('STRIKE')
			break
		if h1 - a2 <= 0:
			h1 += c1
			h1 -= a2
			D.append('HEAL')
		else:
			h2 -= a1
			h1 -= a2
			D.append('STRIKE')
	print(len(D))
	for i in D:
		print(i)


(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
cnt = 0
log = []
while h2 > 0:
	if a2 >= h1 and a1 < h2:
		h1 += c1
		log.append('HEAL')
	else:
		h2 -= a1
		log.append('STRIKE')
	cnt += 1
	h1 -= a2
print(cnt)
print(*log, sep='\n')


(h1, a1, c1) = list(map(int, input().split()))
(h2, a2) = list(map(int, input().split()))
out = []
b = 0
while h2 > 0:
	if h2 - a1 <= 0:
		h2 -= a1
		out.append('STRIKE')
	elif h1 - a2 <= 0:
		out.append('HEAL')
		h1 += c1 - a2
	else:
		h2 -= a1
		h1 -= a2
		out.append('STRIKE')
	b += 1
print(b)
[print(i) for i in out]


(h1, a1, c1) = [int(i) for i in input().split()]
(h2, a2) = [int(i) for i in input().split()]
counter = 0
lst = []
while h2 > 0:
	if h1 - a2 <= 0 and h2 - a1 > 0:
		h1 += c1
		lst.append('HEAL')
	else:
		h2 -= a1
		lst.append('STRIKE')
	h1 -= a2
	counter += 1
print(counter)
for i in lst:
	print(i)


def main():
	(h1, a1, c1) = [int(x) for x in input().split()]
	(h2, a2) = [int(x) for x in input().split()]
	strike = 0
	heal = 0
	while 1:
		if h1 > a2 or a1 >= h2:
			strike += 1
			h2 -= a1
			if h2 <= 0:
				break
			else:
				h1 -= a2
		else:
			heal += 1
			h1 += c1
			h1 -= a2
	print(strike + heal)
	for j in range(heal):
		print('HEAL')
	for i in range(strike):
		print('STRIKE')
main()


(h1, a1, c1) = [int(x) for x in input().split()]
(h2, a2) = [int(x) for x in input().split()]
l = []
n = 0
while h2 > 0:
	if h1 > a2 or a1 >= h2:
		l.append('STRIKE')
		h1 -= a2
		h2 -= a1
	else:
		l.append('HEAL')
		h1 += c1
		h1 -= a2
	n += 1
print(n)
for i in l:
	print(i)


l = list(map(int, input().split()))
(h, a, c) = (l[0], l[1], l[2])
l = list(map(int, input().split()))
(hk, ak) = (l[0], l[1])
l = []
while hk > 0:
	if h - ak <= 0 and hk - a > 0:
		h += c - ak
		l.append('HEAL')
	else:
		hk -= a
		h -= ak
		l.append('STRIKE')
print(len(l))
for i in l:
	print(i)


(h1, a1, c1) = [int(z) for z in input().split()]
(h2, a2) = [int(z) for z in input().split()]
ans = []

def go(curh1, curh2):
	if curh2 <= a1:
		ans.append('STRIKE')
		curh2 -= a1
		return (curh1, curh2)
	elif curh1 <= a2:
		curh1 += c1
		ans.append('HEAL')
		curh1 -= a2
	else:
		curh2 -= a1
		ans.append('STRIKE')
		if curh2 <= 0:
			return (curh1, curh2)
		curh1 -= a2
	return (curh1, curh2)
curh1 = h1
curh2 = h2
while curh1 > 0 and curh2 > 0:
	(curh1, curh2) = go(curh1, curh2)
print(len(ans))
for i in ans:
	print(i)


text = []
a = 'STRIKE'
b = 'HEAL'
(h1, a1, c1) = map(int, input().split())
(h2, a2) = map(int, input().split())
hpmax = h1
while h2 > 0:
	if h1 - a2 <= 0 and h2 - a1 > 0:
		h1 += c1
		text.append(b)
	else:
		h2 -= a1
		text.append(a)
	h1 -= a2
print(len(text))
for i in text:
	print(i)


import sys
(h1, a1, c1) = map(int, sys.stdin.readline().split())
(h2, a2) = map(int, sys.stdin.readline().split())
c = 0
s = []
while True:
	if h1 - a2 <= 0 and a1 < h2:
		h1 = h1 + c1
		c += 1
		s.append('HEAL')
	else:
		c += 1
		s.append('STRIKE')
		h2 = h2 - a1
	if h2 <= 0:
		break
	h1 = h1 - a2
print(c)
for i in s:
	print(i)