#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;

const string num[9][7] = {
  {
"#######",
"#.....#",
"#...|.#",
"#.....#",
"#...|.#",
"#..-..#",
"#######"
  },
  {
"#######",
"#..-..#",
"#...|.#",
"#..-..#",
"#.|...#",
"#..-..#",
"#######"
  },
  {
"#######",
"#..-..#",
"#...|.#",
"#..-..#",
"#...|.#",
"#..-..#",
"#######"
  },
  {
"#######",
"#.....#",
"#.|.|.#",
"#..-..#",
"#...|.#",
"#.....#",
"#######"
  },
  {
"#######",
"#..-..#",
"#.|...#",
"#..-..#",
"#...|.#",
"#..-..#",
"#######"
  },
  {
"#######",
"#..-..#",
"#.|...#",
"#..-..#",
"#.|.|.#",
"#..-..#",
"#######"
  },
  {
"#######",
"#..-..#",
"#...|.#",
"#.....#",
"#...|.#",
"#.....#",
"#######"
  },
  {
"#######",
"#..-..#",
"#.|.|.#",
"#..-..#",
"#.|.|.#",
"#..-..#",
"#######"
  },
  {
"#######",
"#..-..#",
"#.|.|.#",
"#..-..#",
"#...|.#",
"#..-..#",
"#######"
  }
};

string A[28], B[28];

bool equals(vector<string> &s, const string t[7]) {
  for(int i = 0; i < 7; ++i) {
    for(int j = 0; j < 7; ++j) {
      if((s[i][j] == '-' || s[i][j] == '|') &&
	 (t[i][j] == '-' || t[i][j] == '|')) continue;
      if(s[i][j] != t[i][j]) return false;
    }
  }
  return true;
}

int getNum(vector<string> &s) {
  for(int i = 0; i < 9; ++i) {
    if(equals(s, num[i])) return i+1;
  }
  return 0;
}

void reverseLR(vector<string> &s) {
  for(int i = 0; i < 7; ++i) reverse(s[i].begin(), s[i].end());
}

void reverseTD(vector<string> &s) {
  for(int i = 0; i < 7/2; ++i) {
    for(int j = 0; j < 7; ++j) {
      swap(s[i][j], s[6-i][j]);
    }
  }
}

vector<string> rotate90(vector<string> s) {
  vector<string> t(7, "       ");
  for(int i = 0; i < 7; ++i) {
    for(int j = 0; j < 7; ++j) {
      t[i][j] = s[j][6-i];
    }
  }
  return t;
}

vector<string> rotate270(vector<string> s) {
  vector<string> t(7, "       ");
  for(int i = 0; i < 7; ++i) {
    for(int j = 0; j < 7; ++j) {
      t[i][j] = s[6-j][i];
    }
  }
  return t;
}


vector<string> getFace(int x, int y, string u[28]) {
  vector<string> v;
  for(int i = 0; i < 7; ++i) {
    v.push_back(u[y+i].substr(x,7));
  }
  return v;
}

void show(vector<string> &v) {
  for(int i = 0; i < v.size(); ++i) cout << v[i] << endl;
}

void calcPoint(string u[28], vector<int> &v) {
  vector< vector<string> > face;
  face.push_back(getFace(7,0,u));
  face.push_back(getFace(0,7,u));
  face.push_back(getFace(7,7,u));
  face.push_back(getFace(14,7,u));
  face.push_back(getFace(21,7,u));
  face.push_back(getFace(7,14,u));
  reverseLR(face[0]);
  face[1] = rotate270(face[1]);
  reverseLR(face[1]);
  reverseLR(face[2]);
  face[3] = rotate90(face[3]);
  reverseLR(face[3]);
  reverseLR(face[4]);
  reverseLR(face[5]);
  reverseTD(face[5]);
  int point = 0;
  for(int i = 0; i < 6; ++i) {
    v.push_back(getNum(face[i]));
  }
}

string solve() {
  vector<int> v[2];
  calcPoint(A, v[0]);
  calcPoint(B, v[1]);
  int a, b;
  a = b = 0;
  for(int i = 0; i < v[0].size(); ++i) {
    for(int j = 0; j < v[1].size(); ++j) {
      if(v[0][i] > v[1][j])      ++a;
      else if(v[0][i] < v[1][j]) ++b;
    }
  }
  if(a >= b) return "HIGH";
  else       return "LOW";
}

int main() {
  while(true) {
    string line;
    for(int i = 0; i < 21; ++i) {
      getline(cin, line);
      if(line[0] == '0') return 0;
      A[i] = line.substr(0,28);
      B[i] = line.substr(29);
    }
    cout << solve() << endl;
  }
  return 0;
}

Measured memory_bytes: 0