n = int(input())
l = list(map(int,input().split()))

if 1 in l :
	print('hard') 
else :
	print('easy')
n = int(input())
l = list(map(int,input().split()))

if 1 in l :
	print('hard') 
else :
	print('easy')