#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>

#define TASKNAME "road"

const int MaxN = 100000, MaxK = 26, MaxL = 1 << MaxK;

char s [MaxN];
int a [MaxK];
bool f [MaxL];

int main (void)
{
 int i, j, k, l, m, n;
 freopen (TASKNAME ".in", "rt", stdin);
 freopen (TASKNAME ".out", "wt", stdout);
 while (scanf (" %d", &k) != EOF)
 {
  scanf (" %s", s);
  n = strlen (s);
  memset (a, 0, sizeof (a));
  m = MaxL - 1;
  for (i = 0; i < k; i++)
  {
   j = s[i] - 'A';
   assert (j >= 0 && j < MaxK);
   if (a[j] == 0) m ^= 1 << j;
   a[j]++;
  }
  memset (f, 0, sizeof (f));
  f[m] = true;
  for ( ; i < n; i++)
  {
   j = s[i - k] - 'A';
   a[j]--;
   if (a[j] == 0) m ^= 1 << j;
   j = s[i] - 'A';
   assert (j >= 0 && j < MaxK);
   if (a[j] == 0) m ^= 1 << j;
   a[j]++;
   f[m] = true;
  }
  l = -1; m = MaxK + 1;
  for (i = MaxL - 1; i >= 0; i--)
   if (f[i])
   {
    for (j = MaxL >> 1; j > 0; j >>= 1)
     if (i & j)
      f[i - j] = true;
   }
   else
   {
    j = (i & 0x55555555) + ((i & 0xAAAAAAAA) >> 1);
    j = (j & 0x33333333) + ((j & 0xCCCCCCCC) >> 2);
    j = (j & 0x0F0F0F0F) + ((j & 0xF0F0F0F0) >> 4);
    j = (j & 0x00FF00FF) + ((j & 0xFF00FF00) >> 8);
    j = (j & 0x0000FFFF) + ((j & 0xFFFF0000) >> 16);
    if (m > j)
    {
     m = j;
     l = i;
    }
   }
  assert (l > 0);
  printf ("%d\n", m);
  for (j = 0; j < MaxK; j++)
   if (l & (1 << j))
    printf ("%c\n", char (j + 'A'));
 }
 return 0;
}
