Start: Feb, 21, 2019 12:00:00
2018-2019 ACM集训队冬季集训第二次考核
End: Feb, 21, 2019 17:00:00
Time elapsed:
Time remaining:

Problem_ID: I
Result: Accepted
Time: 5ms
Memory: 1092kB
Author: 2018212212041
In contest: 1261

#include<stdio.h>
#include<algorithm>
#include<string.h>
using namespace std;
int main() {
	int n;
	while(scanf("%d",&n)!=EOF) {
		int a[1000];
		for(int i=0; i<n; i++)scanf("%d",&a[i]);
		if(n==1) {
			printf("H\n");
			continue;
		}
		int i=0,cout=0;
		while(a[i]==1) {
			i++;
			cout++;
		}
		if(cout%2==1)printf("L\n");
		else if(cout==n&&cout%2==1)printf("H\n");
		else if(cout==n&&cout%2==0)printf("L\n");
		else printf("H\n");
	}
}