#include<bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;

enum Type{
	Self,
	Enemy,
};

char number[9][7][8] = {
   {"#######",
	"#.....#",
	"#...|.#",
	"#.....#",
	"#...|.#",
	"#..-..#",
	"#######"}
	,
   {"#######",
	"#..-..#",
	"#...|.#",
	"#..-..#",
	"#.|...#",
	"#..-..#",
	"#######"}
	,
   {"#######",
	"#..-..#",
	"#...|.#",
	"#..-..#",
	"#...|.#",
	"#..-..#",
	"#######"}
	,
   {"#######",
	"#.....#",
	"#.|.|.#",
	"#..-..#",
	"#...|.#",
	"#.....#",
	"#######"}
	,
   {"#######",
	"#..-..#",
	"#.|...#",
	"#..-..#",
	"#...|.#",
	"#..-..#",
	"#######"}
	,
   {"#######",
	"#..-..#",
	"#.|...#",
	"#..-..#",
	"#.|.|.#",
	"#..-..#",
	"#######"}
	,
   {"#######",
	"#..-..#",
	"#...|.#",
	"#.....#",
	"#...|.#",
	"#.....#",
	"#######"}
	,
   {"#######",
	"#..-..#",
	"#.|.|.#",
	"#..-..#",
	"#.|.|.#",
	"#..-..#",
	"#######"}
	,
   {"#######",
	"#..-..#",
	"#.|.|.#",
	"#..-..#",
	"#...|.#",
	"#..-..#",
	"#######"}
	};

int H = 7,W = 7;
int num_array[10][2];
int start_row[2][6] = {{0,7,7,7,7,14},{0,7,7,7,7,14}};
int start_col[2][6] = {{7,0,7,14,21,7},{36,29,36,43,50,36}};
char input[21][60];

void copyTable(char to[7][8],char from[7][8]){

	for(int row = 0; row < H; row++){
		for(int col = 0; col < W; col++)to[row][col] = from[row][col];
	}
}

void reverse_LR(char table[7][8]){

	char work[7][8];
	copyTable(work,table);

	for(int row = 0; row < H; row++){
		for(int col = 0; col < W; col++){
			work[row][(W-1)-col] = table[row][col];
		}
	}
	copyTable(table,work);
}

void reverse_UD(char table[7][8]){

	char work[7][8];
	copyTable(work,table);

	for(int row = 0; row < H; row++){
		for(int col = 0; col < W; col++){
			work[(H-1)-row][col] = table[row][col];
		}
	}
	copyTable(table,work);
}

void roll_rev_90(char table[7][8]){

	char work[7][8];
	copyTable(work,table);

	for(int row = 0; row < H; row++){
		for(int col = 0; col < W; col++){
			if(table[row][col] == '|'){
				work[(W-1)-col][row] = '-';
			}else if(table[row][col] == '-'){
				work[(W-1)-col][row] = '|';
			}else{
				work[(W-1)-col][row] = table[row][col];
			}
		}
	}
	copyTable(table,work);

}

void roll_90(char table[7][8]){

	char work[7][8];
	copyTable(work,table);

	for(int row = 0; row < H; row++){
		for(int col = 0; col < W; col++){
			if(table[row][col] == '|'){
				work[col][(H-1)-row] = '-';
			}else if(table[row][col] == '-'){
				work[col][(H-1)-row] = '|';
			}else{
				work[col][(H-1)-row] = table[row][col];
			}
		}
	}
	copyTable(table,work);
}

bool compare_num(char left[7][8],char right[7][8]){

	for(int row = 0; row < H; row++){
		for(int col = 0; col < W; col++){
			if(left[row][col] != right[row][col])return false;
		}
	}

	return true;
}

void calc(Type type){

	char work[7][8],compare[7][8];
	int match_num;

	for(int loop = 0; loop < 6; loop++){
		//盤面の切り出し
		for(int row = 0; row < H; row++){
			for(int col = 0; col < W; col++){
				work[row][col] = input[start_row[type][loop]+row][start_col[type][loop]+col];
			}
		}
		match_num = -1;
		//該当する数字を検索
		for(int i = 1; i <= 9; i++){
			copyTable(compare,number[i-1]);

			reverse_LR(compare); //左右反転
			switch(loop){
			case 1:
				roll_rev_90(compare);
				break;
			case 3:
				roll_90(compare);
				break;
			case 5:
				reverse_UD(compare);
				break;
			}

			if(compare_num(work,compare)){
				match_num = i;
				break;
			}

		}
		num_array[match_num][type]++;
	}
}

void func(){

	for(int row = 1; row < 21; row++){
		scanf("%s",input[row]);
	}
	calc(Self);
	calc(Enemy);

	int num_self = 0,num_enemy = 0;
	for(int i = 2; i <= 9; i++){
		for(int k = 1; k <= i-1; k++){
			num_self += num_array[i][Self]*num_array[k][Enemy];
		}
	}

	for(int i = 2; i <= 9; i++){
		for(int k = 1; k <= i-1; k++){
			num_enemy += num_array[i][Enemy]*num_array[k][Self];
		}
	}

	if(num_self >= num_enemy){
		printf("HIGH\n");
	}else{
		printf("LOW\n");
	}
}

int main(){

	while(true){
		scanf("%s",input[0]);
		if(input[0][0] == '0')break;

		for(int i = 1; i <= 9; i++){
			num_array[i][Self] = 0;
			num_array[i][Enemy] = 0;
		}

		func();
	}

	return 0;
}



Measured memory_bytes: 3140