#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <complex>
#include <queue>
#include <map>
#include <set>
#include <cstring>
#include <cstdlib>
#include <string>
#include <cmath>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
const int INF = 1<<29;

bool dice[9][7][7];

int equal(bool d[7][7], int flag) {
  // REP(y, 7) {
  //   REP(x, 7) {
  //     cout << d[x][y];
  //   }
  //   cout << endl;
  // }
  // cout << endl;
  REP(i, 9) {
    bool f = 1;
    if (flag == 0) {
      REP(y, 7)
        REP(x, 7)
        if (d[x][y] != dice[i][6-x][y])
          f = 0;
      if (f) return i;
    } else if (flag == 1) {
      REP(y, 7)
        REP(x, 7)
        if (d[x][y] != dice[i][y][x])
          f = 0;
      if (f) return i;
    } else if (flag == 2) {
      REP(y, 7)
        REP(x, 7)
        if (d[x][y] != dice[i][6-y][6-x])
          f = 0;
      if (f) return i;
    } else {
      REP(y, 7)
        REP(x, 7)
        if (d[x][y] != dice[i][6-x][6-y])
          f = 0;
      if (f) return i;
    }
  }
  return -2;
}

vector<int> hoge(bool table[21][28]) {
  // REP(y, 21) {
  //   REP(x, 28) {
  //     cout << table[y][x];
  //   }
  //   cout << endl;
  // }
  // cout << endl;
  vector<int> v;
  bool tmp[7][7];
  REP(i, 2) {
    REP(y,7)
      REP(x,7)
      tmp[x][y] = table[i*7+y][x+7];
    v.push_back(equal(tmp, 0)+1); // ツ債カツ右ツ板スツ転
  }
  REP(y, 7) {
    REP(x, 7) {
      tmp[x][y] = table[7+y][21+x];
    }
  }
  v.push_back(equal(tmp, 0)+1); // ツ債カツ右ツ板スツ転
  REP(y, 7) {
    REP(x, 7) {
      tmp[x][y] = table[y+7][x];
    }
  }
  v.push_back(equal(tmp, 1)+1); //
  REP(y, 7) {
    REP(x, 7) {
      tmp[x][y] = table[y+7][14+x];
    }
  }
  v.push_back(equal(tmp, 2)+1); //
  REP(y, 7) {
    REP(x, 7) {
      tmp[x][y] = table[y+14][7+x];
    }
  }
  v.push_back(equal(tmp, 3)+1); //

  
  // FOR(it, v) {
  //   cout<< *it << " ";
  // }
  // cout << endl;
  return v;
}

int main() {
  dice[0][4][2]=dice[0][4][4]=dice[0][3][5] = 1;
  dice[1][3][1]=dice[1][4][2]=dice[1][3][3]=dice[1][2][4]=dice[1][3][5] = 1;
  dice[2][3][1]=dice[2][4][2]=dice[2][3][3]=dice[2][4][4]=dice[2][3][5] = 1;
  dice[3][2][2]=dice[3][4][2]=dice[3][3][3]=dice[3][4][4] = 1;
  dice[4][3][1]=dice[4][2][2]=dice[4][3][3]=dice[4][4][4]=dice[4][3][5] = 1;
  dice[5][3][1]=dice[5][2][2]=dice[5][3][3]=dice[5][2][4]=dice[5][4][4]=dice[5][3][5] = 1;
  dice[6][3][1]=dice[6][4][2]=dice[6][4][4] = 1;
  dice[7][3][1]=dice[7][2][2]=dice[7][4][2]=dice[7][3][3]=dice[7][2][4]=dice[7][4][4]=dice[7][3][5] = 1;
  dice[8][3][1]=dice[8][2][2]=dice[8][4][2]=dice[8][3][3]=dice[8][4][4]=dice[8][3][5] = 1;


  // REP(i, 9) {
  //   REP(y, 7) {
  //     REP(x, 7) {
  //       cout << dice[i][x][y];
  //     }
  //     cout << endl;
  //   }
  //   cout << endl;
  // }
  bool table[21][57];
  char c;
  while(cin>>c,c!='0') {
    REP(i,21) {
      REP(j,57) {
        if (i||j)
          cin >> c;
        if (c=='-'||c=='|') {
          table[i][j] = 1;
        }
        else table[i][j] = 0;
      }
    }
    vector<int> v[2];
    bool table1[21][28];
    REP(i,2) {
      REP(y, 21) {
        REP(x, 28) {
          table1[y][x] = table[y][i*29+x];
        }
      }
      v[i] = hoge(table1);
    }

    int low=0, high=0;
    REP(i, 6) {
      REP(j, 6) {
        if (v[0][i] < v[1][j]) {
          low++;
        } else if (v[0][i] > v[1][j])
          high++;
      }
    }
    if (low>high) {
      cout << "LOW" << endl;
    } else {
      cout << "HIGH" << endl;
    }
  }
}

Measured memory_bytes: 0