/* Solution to "slots of fun" by Bob Roos */
#include <stdio.h>
#define MAXN 12
#define MAXC 78

int n;
int m;
int found;
char tri[MAXN][MAXN];
char input[79];
int used[26];

/*
store data in a 2-d array (lower triangular part)
define functions to convert input array index into
row,column
define a "distance" function in the array (hmmm. this might be trickier
than I thought; there's a sqrt(3) in there somewhere!)
*/
int abs(int i) {
  if (i < 0) return -i;
  return i;
}

int row(int i) {
  int j = 1;
  while (i > j*(j+1)/2)
    j++;
  return j-1;
}

int col(int i) {
  int r = row(i)+1;
  return i -r*(r-1)/2 - 1;
}

int diag(int i) {
  return row(i) - col(i);
}


int istri(int i, int j, int k) {
  int ri,rj,rk,ci,cj,ck,di,dj,dk,flag1,flag2;
  ri = row(i);
  rj = row(j);
  rk = row(k);
  ci = col(i);
  cj = col(j);
  ck = col(k);
  if ((tri[ri][ci] != tri[rj][cj]) || (tri[ri][ci] != tri[rk][ck])) return 0;
  di = diag(i);
  dj = diag(j);
  dk = diag(k);
  flag1 = 1;
  if ((abs(rj-ri) != abs(ck-cj)) || (abs(di-dk) != abs(rj-ri))) flag1 = 0;
  if ((abs(cj-ci) != abs(dk-dj)) || (abs(ri-rk) != abs(cj-ci))) flag1 = 0;
  if ((abs(dj-di) != abs(rk-rj)) || (abs(ci-ck) != abs(dj-di))) flag1 = 0;
  flag2 = 1;
  if ((abs(rk-ri) != abs(cj-ck)) || (abs(di-dj) != abs(rk-ri))) flag2 = 0;
  if ((abs(ck-ci) != abs(dj-dk)) || (abs(ri-rj) != abs(ck-ci))) flag2 = 0;
  if ((abs(dk-di) != abs(rj-rk)) || (abs(ci-cj) != abs(dk-di))) flag2 = 0;
  return flag1 || flag2;
}

void solve() {
  int i, j,k;
  char c;
/*
  for (i = 1; i <= m; i++)
    printf("%d: %d %d %d\n",i,row(i),col(i),diag(i));
*/
  for (i = 1; i < m; i++)
    for (j = i+1; j < m; j++)
      for (k = j+1; k <= m; k++)
        if (istri(i,j,k)) {
          c = tri[row(i)][col(i)];
          used[c-'a'] = 1;
          found = 1;
        }
  if (found) {
    for (i = 0; i < 26; i++)
      if (used[i])
        printf("%c",i+'a');
    printf("\n");
  }
  else
    printf("LOOOOOOOOSER!\n");
}

int main() {
  int i,j,count;

  while(scanf("%d",&n) && n > 0) {
    m = n*(n+1)/2;
    scanf("%s",input);
    count = 0;
    for (i = 0; i < n; i++)
      for (j = 0; j <= i; j++)
        tri[i][j] = input[count++];
    for (i = 0; i < 26; i++)
       used[i] = 0;
    found = 0;
    solve();
  }
  return 0;
}
/*

for i = 1 to n(n+1)/2
  for  j = i+1 to n(n+1)/2
    for k = j+1 to n(n+1)/2
       if letter[i] == letter[j] == letter[k] and dist(row(i),col(i)) ==
           dist(row(j),col(j)) == dist(row(k),col(k))
        then add letter[i] to a list
sort list and print distinct elements
*/
