#include <bits/stdc++.h>
using namespace std;
int n, i, tree[2097160], j, x = 0, k, b[100009], kol[100009], z = 1;
struct Pair {
  int i;
  int j;
};
Pair a[100009];
bool cmp1(Pair p1, Pair p2) { return p1.i < p2.i; }
bool cmp2(Pair p1, Pair p2) { return p1.j < p2.j; }
int main() {
  scanf("%d%d\n", &n, &k);
  for (i = 1; i <= n; i++) {
    scanf("%d\n", &a[i].i);
    a[i].j = i;
  }
  sort(a + 1, a + n + 1, cmp1);
  i = 0;
  while (i < n) {
    i++;
    j = i;
    x++;
    b[x] = a[j].i;
    while (a[i + 1].i == a[j].i) {
      a[i + 1].i = x;
      i++;
    }
    a[j].i = x;
  }
  sort(a + 1, a + n + 1, cmp2);
  while (z < x) z *= 2;
  for (i = 1; i <= n; i++) {
    kol[a[i].i]++;
    if (i > k) {
      kol[a[i - k].i]--;
      if (kol[a[i - k].i] == 1) {
        x = a[i - k].i;
        tree[x + z - 1] = x;
        x = x + z - 1;
        while (x > 1) {
          x /= 2;
          tree[x] = max(tree[x * 2], tree[x * 2 + 1]);
        }
      } else {
        x = a[i - k].i;
        tree[x + z - 1] = 0;
        x = x + z - 1;
        while (x > 1) {
          x /= 2;
          tree[x] = max(tree[x * 2], tree[x * 2 + 1]);
        }
      }
    }
    if (kol[a[i].i] == 1) {
      x = a[i].i;
      tree[x + z - 1] = x;
      x = x + z - 1;
      while (x > 1) {
        x /= 2;
        tree[x] = max(tree[x * 2], tree[x * 2 + 1]);
      }
    } else {
      x = a[i].i;
      tree[x + z - 1] = 0;
      x = x + z - 1;
      while (x > 1) {
        x /= 2;
        tree[x] = max(tree[x * 2], tree[x * 2 + 1]);
      }
    }
    if (i >= k)
      if (tree[1] != 0)
        printf("%d\n", b[tree[1]]);
      else
        printf("Nothing\n");
  }
  return 0;
}
