#include <iostream>
#include <algorithm>
#include <string>
#include <vector>

#define W 57
#define H 21

using namespace std;
vector<int> v1, v2;

char dice[30][65];
char def[70][9] = {
  "#######",
  "#.....#",
  "#...|.#",
  "#.....#",
  "#...|.#",
  "#..-..#",
  "#######",
  "#######",
  "#..-..#",
  "#...|.#",
  "#..-..#",
  "#.|...#",
  "#..-..#",
  "#######",
  "#######",
  "#..-..#",
  "#...|.#",
  "#..-..#",
  "#...|.#",
  "#..-..#",
  "#######",
  "#######",
  "#.....#",
  "#.|.|.#",
  "#..-..#",
  "#...|.#",
  "#.....#",
  "#######",
  "#######",
  "#..-..#",
  "#.|...#",
  "#..-..#",
  "#...|.#",
  "#..-..#",
  "#######",
  "#######",
  "#..-..#",
  "#.|...#",
  "#..-..#",
  "#.|.|.#",
  "#..-..#",
  "#######",
  "#######",
  "#..-..#",
  "#...|.#",
  "#.....#",
  "#...|.#",
  "#.....#",
  "#######",
  "#######",
  "#..-..#",
  "#.|.|.#",
  "#..-..#",
  "#.|.|.#",
  "#..-..#",
  "#######",
  "#######",
  "#..-..#",
  "#.|.|.#",
  "#..-..#",
  "#...|.#",
  "#..-..#",
  "#######"
};

int p1[6] = {0, 7, 7, 7, 7, 14};
int q1[6] = {7, 0, 7, 14, 21, 7};
int q2[6] = {36, 29, 36, 43, 50, 36};

bool check(int s, int t, int p, int q)
{
  if(t%2 == 0){
    for(int i = 0; i < 7; i++)
      for(int j = 0; j < 7; j++)
	if(def[i+7*s][j] != dice[i+p][6-j+q]) return false;
  } else if(t == 1){
    for(int i = 0; i < 7; i++)
      for(int j = 0; j < 7; j++){
	char c = dice[j+p][i+q];
	if(c == '|') c = '-';
	else if(c == '-') c = '|';
	if(def[i+7*s][j] != c) return false;
      }
  } else if(t == 3){
    for(int i = 0; i < 7; i++)
      for(int j = 0; j < 7; j++){
	char c = dice[6-j+p][6-i+q];
	if(c == '|') c = '-';
	else if(c == '-') c = '|';
	if(def[i+7*s][j] != c) return false;
      }
  } else {
    for(int i = 0; i < 7; i++)
      for(int j = 0; j < 7; j++)
	if(def[i+7*s][j] != dice[6-i+p][6-j+q]) return false;
  }

  return true;
}

void func()
{
  for(int i = 0; i < 6; i++){
    for(int j = 0; j < 9; j++)
      if(check(j, i, p1[i], q1[i])){
	v1.push_back((j+1));
	break;
      }
    for(int j = 0; j < 9; j++)
      if(check(j, i, p1[i], q2[i])){
	v2.push_back((j+1));
	break;
      }
  }
  sort(v1.begin(), v1.end());
  sort(v2.begin(), v2.end());

  return ;
}

string func2()
{
  int s = 0, t, u=0;

  for(int i = 0; i < 6; i++)
    for(t = 0; t < 6; t++){
      if(v1[i] > v2[t]) s++;
      if(v1[i] == v2[t]) u++;
    }

  return (((double)s/(36-u) >= 0.5)? "HIGH" : "LOW");
}

int main()
{
  string str;
  while(getline(cin, str) && str != "0"){
    for(int i = 0; i < W; i++) dice[0][i] = str[i];
    for(int i = 1; i < H; i++){
      getline(cin, str);
      for(int j = 0; j < W; j++) dice[i][j] = str[j];
    }
    func();
    cout << func2() << endl;

    v1.clear();
    v2.clear();
  }

  return 0;
} 