In Search of an Easy Problem

Practice this coding question on Coding Gurukul.

Problem statement

A workshop coordinator asks every participant whether a proposed warm-up exercise feels easy or hard. Each participant submits one binary response. The coordinator follows a conservative policy: the exercise can be advertised as easy only when nobody reports difficulty. You are building the tiny survey summary that determines which label appears on the workshop dashboard. Your task Read n responses, each either 0 for easy or 1 for hard. Print HARD if at least one response is 1. Print EASY only if all responses are 0. Responses are votes about the same exercise, and the final decision does not depend on a majority. Important details One hard response is enough even when all others say easy. A single-participant survey follows the same rule. Do not confuse the number of responses with the value of a response. Worked example The responses 0, 0, 1, 0 include one participant who reported difficulty. Therefore the dashboard must display HARD.

Input format

First line: n. Second line: n binary integers.

Output format

Print EASY or HARD.

Constraints

1 <= n <= 100; every response is 0 or 1.

Sample input

4
0 0 1 0

Sample output

HARD

Sign in to run or submit a solution in C++, Java or Python.