#include <bits/stdc++.h>
using namespace std;
int Set(int N, int pos) { return N = N | (1 << pos); }
int Reset(int N, int pos) { return N = N & ~(1 << pos); }
bool Check(int N, int pos) { return (bool)(N & (1 << pos)); }
long long BM(long long a, long long b, long long m) {
  if (b == 0) return 1;
  long long x = BM(a, b / 2, m);
  x = ((x % m) * (x % m)) % m;
  if (b % 2) x = ((x % m) * (a % m)) % m;
  return x;
}
int flag[30];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  string s;
  cin >> s;
  string Ans, temp, ans;
  Ans = "";
  int fin = 0x7fffffff, cnt;
  for (int i = 0; i < (int)s.size(); i++) {
    if (flag[s[i] - 'a'] == 0) {
      flag[s[i] - 'a'] = 1;
      ans = "";
      temp = "";
      cnt = i;
      temp.push_back(s[i]);
      for (int j = i + 1; j < (int)s.size(); j++) {
        if (s[j] != temp[0]) {
          temp.push_back(s[j]);
          ans += temp;
          temp.clear();
          if (j + 1 < (int)s.size()) {
            temp.push_back(s[j + 1]);
            j++;
          }
        } else {
          cnt++;
        }
      }
    }
    if (cnt < fin) {
      fin = cnt;
      Ans = ans;
      ans.clear();
    }
  }
  cout << abs((int)s.size() - (int)Ans.size()) << endl;
  cout << Ans << endl;
  return 0;
}
