Algorithm


A. In Search of an Easy Problem
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

When preparing a tournament, Codeforces coordinators try treir best to make the first problem as easy as possible. This time the coordinator had chosen some problem and asked n">𝑛 people about their opinions. Each person answered whether this problem is easy or hard.

If at least one of these n">𝑛 people has answered that the problem is hard, the coordinator decides to change the problem. For the given responses, check if the problem is easy enough.

Input

The first line contains a single integer n">𝑛 (1≤n≤100">1𝑛1001≤�≤100) — the number of people who were asked to give their opinions.

The second line contains n">𝑛 integers, each integer is either 0">00 or 1">11. If i">𝑖-th integer is 0">00, then i">𝑖-th person thinks that the problem is easy; if it is 1">11, then i">𝑖-th person thinks that the problem is hard.

Output

Print one word: "EASY" if the problem is easy according to all responses, or "HARD" if there is at least one person who thinks the problem is hard.

You may print every letter in any register: "EASY", "easy", "EaSY" and "eAsY" all will be processed correctly.

Examples
input
Copy
3
0 0 1
output
Copy
HARD
input
Copy
1
0
output
Copy
EASY
Note

In the first example the third person says it's a hard problem, so it should be replaced.

In the second example the problem easy for the only person, so it doesn't have to be replaced.

Code Examples

#1 Code Example with C++ Programming

Code - C++ Programming

#include<iostream>
using namespace std;

int main() {
  int n, m, r = 0;
  cin>>n;
  for(int i = 0; i  <  n; i++) {
    cin>>m;
    r |= m;
    if(r == 1) {
      cout<<"HARD";
      return 0;
    }
  }
  cout<<"EASY";
  return 0;
}
Copy The Code & Try With Live Editor

Input

x
+
cmd
3
0 0 1

Output

x
+
cmd
HARD
Advertisements

Demonstration


Codeforces solution 1030-A - In Search of an Easy Problem Codeforces solution, codeforces 1030 solution, codeforces in search of an easy solution, codeforces c programming solution

Previous
Codeforces solution - 1011-A In C, C++, Java, Python Solution
Next
Codeforces solution 1080-B-B. Margarite and the best present codeforces solution