#include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cassert>

using namespace std;

#define FOR(i,k,n) for(int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n)
#define FORIT(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)

template<class T> void debug(T begin, T end){ for(T i = begin; i != end; ++i) cerr<<*i<<" "; cerr<<endl; }
inline bool valid(int x, int y, int W, int H){ return (x >= 0 && y >= 0 && x < W && y < H); }

typedef long long ll;
const int INF = 100000000;
const double EPS = 1e-8;
const int MOD = 1000000007;
int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
void rev_x(vector<string>& v){
  for(int y = 0; y < v.size(); y++){
    reverse(v[y].begin(), v[y].end());
  }
}
void rev_y(vector<string>& v){
  reverse(v.begin(), v.end());
}
void rotate90(vector<string>& v){
  vector<string> memo = v;
  for(int y = 0; y < 7; y ++){
    for(int x = 0; x < 7; x++){
      if(memo[y][x] == '|') memo[y][x] = '-';
      else if(memo[y][x] == '-') memo[y][x] = '|';
      v[6 - x][y] = memo[y][x];
    }
  }
}
vector<string> cye;
int check(vector<string> die, int r){
  if(r == 6) rev_y(die);
  rev_x(die);
  if(r == 2) rotate90(die);
  if(r == 4) rotate90(die);
  if(r == 4) rotate90(die);
  if(r == 4) rotate90(die);
  for(int i = 0; i < 9; i++){
    vector<string> v(7);
    for(int y = 0; y < 7; y++){
      v[y] = cye[i * 7 + y];
    }
    if(v == die){
      return i + 1;
    }
  }
  assert(false);
  return 0;
}
void init(){
  cye.push_back("#######");
  cye.push_back("#.....#");
  cye.push_back("#...|.#");
  cye.push_back("#.....#");
  cye.push_back("#...|.#");
  cye.push_back("#..-..#");
  cye.push_back("#######");
  cye.push_back("#######");
  cye.push_back("#..-..#");
  cye.push_back("#...|.#");
  cye.push_back("#..-..#");
  cye.push_back("#.|...#");
  cye.push_back("#..-..#");
  cye.push_back("#######");
  cye.push_back("#######");
  cye.push_back("#..-..#");
  cye.push_back("#...|.#");
  cye.push_back("#..-..#");
  cye.push_back("#...|.#");
  cye.push_back("#..-..#");
  cye.push_back("#######");
  cye.push_back("#######");
  cye.push_back("#.....#");
  cye.push_back("#.|.|.#");
  cye.push_back("#..-..#");
  cye.push_back("#...|.#");
  cye.push_back("#.....#");
  cye.push_back("#######");
  cye.push_back("#######");
  cye.push_back("#..-..#");
  cye.push_back("#.|...#");
  cye.push_back("#..-..#");
  cye.push_back("#...|.#");
  cye.push_back("#..-..#");
  cye.push_back("#######");
  cye.push_back("#######");
  cye.push_back("#..-..#");
  cye.push_back("#.|...#");
  cye.push_back("#..-..#");
  cye.push_back("#.|.|.#");
  cye.push_back("#..-..#");
  cye.push_back("#######");
  cye.push_back("#######");
  cye.push_back("#..-..#");
  cye.push_back("#...|.#");
  cye.push_back("#.....#");
  cye.push_back("#...|.#");
  cye.push_back("#.....#");
  cye.push_back("#######");
  cye.push_back("#######");
  cye.push_back("#..-..#");
  cye.push_back("#.|.|.#");
  cye.push_back("#..-..#");
  cye.push_back("#.|.|.#");
  cye.push_back("#..-..#");
  cye.push_back("#######");
  cye.push_back("#######");
  cye.push_back("#..-..#");
  cye.push_back("#.|.|.#");
  cye.push_back("#..-..#");
  cye.push_back("#...|.#");
  cye.push_back("#..-..#");
  cye.push_back("#######");
}

int main(){
  init();
  while(true){
    vector<string> grid(21);
    REP(i, 21) cin >> grid[i];
    if(cin.eof()) break;
    int bx[6] = {7, 0, 7, 14, 21, 7};
    int by[6] = {0, 7, 7, 7, 7, 14};
    vector<int> c1, c2;
    for(int i = 0; i < 6; i++){
      vector<string> die(7);
      REP(y, 7){
        die[y] = grid[y + by[i]].substr(bx[i], 7);
      }
      c1.push_back(check(die, i + 1));
    }
    for(int i = 0; i < 6; i++){
      vector<string> die(7);
      REP(y, 7){
        die[y] = grid[y + by[i]].substr(bx[i] + 29, 7);
      }
      c2.push_back(check(die, i + 1));
    }
    int ans = 0;
    REP(i, 6)REP(j, 6){
      if(c1[i] > c2[j]) ans++;
      if(c1[i] < c2[j]) ans--;
    }
    if(ans >= 0) cout << "HIGH" << endl;
    else cout << "LOW" << endl;
  }
  return 0;
}

Measured memory_bytes: 1240