#include<bits/stdc++.h>
using namespace std;

string t[63]={
  "#######",
  "#.....#",
  "#...|.#",
  "#.....#",
  "#...|.#",
  "#..-..#",
  "#######",
  "#######",
  "#..-..#",
  "#...|.#",
  "#..-..#",
  "#.|...#",
  "#..-..#",
  "#######",
  "#######",
  "#..-..#",
  "#...|.#",
  "#..-..#",
  "#...|.#",
  "#..-..#",
  "#######",
  "#######",
  "#.....#",
  "#.|.|.#",
  "#..-..#",
  "#...|.#",
  "#.....#",
  "#######",
  "#######",
  "#..-..#",
  "#.|...#",
  "#..-..#",
  "#...|.#",
  "#..-..#",
  "#######",
  "#######",
  "#..-..#",
  "#.|...#",
  "#..-..#",
  "#.|.|.#",
  "#..-..#",
  "#######",
  "#######",
  "#..-..#",
  "#...|.#",
  "#.....#",
  "#...|.#",
  "#.....#",
  "#######",
  "#######",
  "#..-..#",
  "#.|.|.#",
  "#..-..#",
  "#.|.|.#",
  "#..-..#",
  "#######",
  "#######",
  "#..-..#",
  "#.|.|.#",
  "#..-..#",
  "#...|.#",
  "#..-..#",
  "#######"
};


char num[10][7][7];

char u[21][57];

bool check(int id,int y,int x,bool f=false){

  bool flg=true;
  for(int i=0;i<7;i++){
    for(int j=0;j<7;j++){
      if(u[y+i][x+j]!=num[id][i][j]){
	if(f)cout<<i<<' '<<j<<" !!!  "<<u[y+i][x+j]<<' '<<num[id][i][j]<<' '<<y<<' '<<x<<endl;
	flg=false;
      }
    }
  }
  if(flg)return true;
  return false;
}



int getNum(int y,int x){
  for(int res=1;res<=9;res++){
    if(check(res,y,x)){
      return res;
    }
  }

  for(int i=0;i<7;i++){
    for(int j=0;j<7;j++){
      cout<<u[i+y][j+x];
    }

    cout<<" : ";
    for(int j=0;j<7;j++){
      cout<<num[5][i][j];
    }
    cout<<endl;

    
  }
  cout<<y<<' '<<x<<endl;

  assert(0);
  return -1;
}


void fa(int y,int x){
  char tmp[7][7];
  for(int i=0;i<7;i++)for(int j=0;j<7;j++)tmp[i][j]=u[i+y][j+x];  
  for(int i=0;i<7;i++)for(int j=0;j<7;j++)u[i+y][j+x]=tmp[i][6-j];
}

void fb(int y,int x){
  char tmp[7][7];
  for(int i=0;i<7;i++)
    for(int j=0;j<7;j++){
      tmp[i][j]=u[i+y][j+x];  
      if(tmp[i][j]=='-')tmp[i][j]='|';
      else if(tmp[i][j]=='|')tmp[i][j]='-';
    }
  for(int i=0;i<7;i++)for(int j=0;j<7;j++)u[i+y][j+x]=tmp[6-j][i];
}

int main(){
  while(1){
    int p=0;
    for(int i=1;i<=9;i++){
      for(int j=0;j<7;j++){
	for(int k=0;k<7;k++){
	  num[i][j][k]=t[p][k];
	}
	p++;
      }
    
    }
  
    for(int i=0;i<21;i++){
      for(int j=0;j<57;j++){
	cin>>u[i][j];
	if(i==0&&j==0&&u[i][j]=='0')return 0;
      }
    }
    vector<int> L,R;
    int C=0;
    for(int i=0;i<21;i+=7){
      for(int j=0;j<28;j+=7){
	if(u[i][j]=='.')continue;
	C++;
	if(C==1){
	  fa(i,j);
	}
	if(C==2){
	  fb(i,j);
	  fa(i,j);
	}
	if(C==3){
	  fa(i,j);
	}
	if(C==4){
	  fb(i,j);	  fb(i,j);	  fb(i,j);
	  fa(i,j);
	}
	if(C==5){
	  fa(i,j);
	}
	if(C==6){
	  fb(i,j);fb(i,j);
	}
	L.push_back( getNum(i,j) );
      }
    }
    C=0;
    for(int i=0;i<21;i+=7){
      for(int j=29;j<57;j+=7){
	if(u[i][j]=='.')continue;
	C++;
	if(C==1){
	  fa(i,j);
	}
	if(C==2){
	  fb(i,j);
	  fa(i,j);
	}
	if(C==3){
	  fa(i,j);
	}
	if(C==4){
	  fb(i,j);fb(i,j);fb(i,j);
	  fa(i,j);
	}
	if(C==5){
	  fa(i,j);
	}
	if(C==6){
	  fb(i,j);fb(i,j);
	}
	R.push_back( getNum(i,j) );
      }
    }

    int cnt=0;
    for(int i=0;i<6;i++){

      for(int j=0;j<6;j++){
	if(L[i]>R[j])cnt++;
	if(L[i]<R[j])cnt--;
      }
    }
    if(cnt>=0)cout<<"HIGH"<<endl;
    else cout<<"LOW"<<endl;
  }
  return 0;
}

Measured memory_bytes: 1208