#include <iostream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <map>
#include <algorithm>
#include <set>
#include <sstream>
#include <numeric>
#include <bitset>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cctype>
#include <cassert>
using namespace std;

typedef long long ll;
static const double EPS = 1e-8;
static const double PI = 4.0 * atan(1.0);
bool ISINT(double x){return fabs(x-(int)x)<EPS;}
bool ISEQ(double x,double y){return fabs(x-y)<EPS;}
string itos(ll x){stringstream ss;ss<<x;return ss.str();}
#define REP(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
#define EREP(i,a,b) for(int i=a;i<=b;i++)
#define erep(i,n) EREP(i,0,n)
#define foreach(itr,c) for(__typeof(c.begin()) itr=c.begin();itr!=c.end();itr++)

char digit[9][7][8] = {
  "#######",
  "#.....#",
  "#...|.#",
  "#.....#",
  "#...|.#",
  "#..-..#",
  "#######",

  "#######",
  "#..-..#",
  "#...|.#",
  "#..-..#",
  "#.|...#",
  "#..-..#",
  "#######",

  "#######",
  "#..-..#",
  "#...|.#",
  "#..-..#",
  "#...|.#",
  "#..-..#",
  "#######",

  "#######",
  "#.....#",
  "#.|.|.#",
  "#..-..#",
  "#...|.#",
  "#.....#",
  "#######",

  "#######",
  "#..-..#",
  "#.|...#",
  "#..-..#",
  "#...|.#",
  "#..-..#",
  "#######",

  "#######",
  "#..-..#",
  "#.|...#",
  "#..-..#",
  "#.|.|.#",
  "#..-..#",
  "#######",

  "#######",
  "#..-..#",
  "#...|.#",
  "#.....#",
  "#...|.#",
  "#.....#",
  "#######",

  "#######",
  "#..-..#",
  "#.|.|.#",
  "#..-..#",
  "#.|.|.#",
  "#..-..#",
  "#######",

  "#######",
  "#..-..#",
  "#.|.|.#",
  "#..-..#",
  "#...|.#",
  "#..-..#",
  "#######",
};

char input[21][58];

void show(char t[7][7]){
  cout<<"----\n";
  rep(i,7){
    rep(j,7){
      cout<<t[i][j];
    }
    cout<<endl;
  }
  cout<<"----\n";
}

bool equals(char t[7][7],int x){
  rep(i,7){
    rep(j,7){
      if(t[i][j] != digit[x][i][j]){
        return false;
      }
    }
  }
  return true;
}

void rotate(char t[7][7]){
  char tmp[7][7];
  rep(i,7) rep(j,7) tmp[i][j] = t[i][j];
  rep(i,7){
    rep(j,7){
      t[i][j] = tmp[j][6-i];
      if(t[i][j] == '|') t[i][j] = '-';
      else if(t[i][j] == '-') t[i][j] = '|';
    }
  }
}

void reverse(char t[7][7]){
  rep(i,7){
    rep(j,3){
      swap(t[i][j],t[i][6-j]);
    }
  }
}

void reverse2(char t[7][7]){
  rep(i,3){
    rep(j,7){
      swap(t[i][j],t[6-i][j]);
    }
  }
}

void getArray(char t[7][7],int si,int sj){
  REP(i,si,si+7){
    REP(j,sj,sj+7){
      t[i-si][j-sj] = input[i][j];
    }
  }
}

int getDigit(char t[7][7],int step){
  if(step == 0){
    reverse(t);
  }
  else if(step == 1){
    rotate(t);
    rotate(t);
    rotate(t);
    reverse(t);
  }
  else if(step == 2){
    reverse(t);
  }
  else if(step == 3){
    rotate(t);
    reverse(t);
  }
  else if(step == 4){
    reverse(t);
  }
  else{
    reverse(t);
    reverse2(t);
  }

  rep(i,9){
    if(equals(t,i)){
      return i+1;
    }
  }
  return -1;
}

vector<int> getDice(int sj){
  char t[7][7];
  vector<int> res;

  getArray(t,0,sj+7);
  res.push_back(getDigit(t,0));
  getArray(t,7,sj);
  res.push_back(getDigit(t,1));
  getArray(t,7,sj+7);
  res.push_back(getDigit(t,2));
  getArray(t,7,sj+14);
  res.push_back(getDigit(t,3));
  getArray(t,7,sj+21);
  res.push_back(getDigit(t,4));
  getArray(t,14,sj+7);
  res.push_back(getDigit(t,5));

  return res;
}

int main(void){
  while(1){
    rep(i,21){
      scanf("%s",input[i]);
      if(input[i][0] == '0') return 0;
    }

    vector<int> v1 = getDice(0);
    vector<int> v2 = getDice(29);

    double high = 0;
    double low = 0;
    rep(i,6){
      rep(j,6){
        if(v1[i] > v2[j]){
          high += 1.0 / 36;
        }
        else if(v1[i] < v2[j]){
          low += 1.0 / 36;
        }
      }
    }

    if(high >= low){
      printf("HIGH\n");
    }
    else if(high < low){
      printf("LOW\n");
    }
  }
}

Measured memory_bytes: 0