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: 7ms
Memory: 1712kB
Author: Hujia
In contest: 1261


#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <string>
#include <queue>
#include <vector>
#include <map>
typedef long long LL;
using namespace std;
int main()
{
	int n,s[10000],a;
	while(cin>>n){
		for(int i=1;i<=n;++i)
			cin>>s[i];
		bool first=true;
		for(int i=n-1;i>=1;--i)
			if(s[i]==1)
				first=!first;
			else if(!first&&s[i]>1)
				first=true;
		cout<<(first?"H":"L")<<endl;
	}
}