#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 1e5 + 5;
struct node {
  int val;
  int f;
};
int n, k;
node st[N << 2];
int a[N];
map<int, int> mp;
map<int, int> val;
node mrg(node a, node b) {
  if (a.f == b.f && a.f == 0) return {0, 0};
  if (a.f == b.f) {
    if (val[a.val] > val[b.val]) return a;
    return b;
  }
  if (a.f == 0)
    return b;
  else if (b.f == 0)
    return a;
  if (a.f < b.f) return a;
  return b;
}
void update(int p, int l, int r, int dx, int x) {
  if (l == r) {
    st[p].f += x;
    st[p].val = dx;
    return;
  }
  int mid = (l + r) >> 1;
  if (dx <= mid)
    update(p << 1, l, mid, dx, x);
  else
    update(p << 1 | 1, mid + 1, r, dx, x);
  st[p] = mrg(st[p << 1], st[p << 1 | 1]);
}
int main() {
  scanf("%d %d", &n, &k);
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    int dx = mp[a[i]];
    if (dx == 0) {
      mp[a[i]] = ++cnt;
      dx = cnt;
    }
    val[dx] = a[i];
    a[i] = dx;
  }
  int p1 = 1, p2 = 0;
  while (true) {
    p2++;
    if (p2 > n) break;
    update(1, 1, n, a[p2], +1);
    if ((p2 - p1 + 1) % k == 0) {
      node ans = st[1];
      if (ans.f != 1) {
        printf("Nothing\n");
      } else
        printf("%d\n", val[ans.val]);
      update(1, 1, n, a[p1], -1);
      p1++;
    }
  }
}
