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: 305ms
Memory: 10244kB
Author: 2017212212069
In contest: 1261

import java.util.HashMap;
import java.util.Scanner;

public class Main {
	
    public static void main(String[] args){
    	Scanner in = new Scanner(System.in);
    	int n;
    	int[] a = new int[1010];
    	while (in.hasNextInt()) {
    		n = in.nextInt();
    		boolean flag = true;
    		for (int i=0;i<n;++i){
    			a[i] = in.nextInt();
    		}
    		for (int i=0;i<n;++i) {
    			if (a[i] == 1) {
    				flag = !flag;
    			}else {
    				break;
    			}
    		}
    		if (flag) {
    			System.out.println("H");
    		}else {
    			System.out.println("L");
    		}
    	}
    }
    
}