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: 6ms
Memory: 1716kB
Author: 2017212212145
In contest: 1261

#include<cstdio>
#include<iostream>
#include<cmath>
#include<cstring>
#include<string>
#include<algorithm>
#include<cstdlib>
#include<queue>
#include<map>
#include<set>
using namespace std;
#define inf 0x3f3f3f3f
#define mm(a,b) memset(a,b,sizeof(a))
#define MAXN 1020
#define ll long long
const ll mod=(ll)1e9+7;
int n,a[MAXN];

int main()
{
	int flag;
	while(~scanf("%d",&n))
	{
		flag=-1;
		for(int i=1;i<=n;++i)
		{
			scanf("%d",&a[i]);
			if(a[i]!=1 && flag==-1)
				flag=i-1;
		}
		if(flag==-1) flag=n;
		if(n==1||(flag % 2==0 && flag!=n)||(flag==n && n%2)) printf("H\n");
		else printf("L\n");
	}
}