#include <bits/stdc++.h>
using namespace std;
int a[112345], as[112345], asd[112345];
int cnt[312345], mx[312345];
void update(int node, int l, int r, int leafno, int adddel) {
  if (l == r) {
    cnt[l] += adddel;
    if (cnt[l] == 1)
      mx[node] = asd[leafno];
    else
      mx[node] = -2000000000;
    return;
  }
  if (leafno <= (l + r) / 2)
    update(2 * node, l, (l + r) / 2, leafno, adddel);
  else
    update(2 * node + 1, (l + r) / 2 + 1, r, leafno, adddel);
  mx[node] = max(mx[2 * node], mx[2 * node + 1]);
}
int main() {
  int n, k;
  scanf("%d", &n);
  scanf("%d", &k);
  for (int i = (int)(0); i <= (int)((n - 1)); i++) {
    scanf("%d", &a[i]);
    as[i] = a[i];
  }
  sort(as, as + n);
  map<int, int> lfno;
  lfno[as[0]] = 1;
  int ctr = 2;
  asd[1] = as[0];
  for (int i = 1; i < n; i++) {
    if (as[i] != as[i - 1]) {
      asd[ctr] = as[i];
      lfno[as[i]] = ctr++;
    }
  }
  int treesz = ctr - 1;
  for (int i = (int)(0); i <= (int)((4 * treesz + 1 - 1)); i++)
    mx[i] = -2000000000;
  for (int i = (int)(0); i <= (int)((k - 1)); i++) {
    update(1, 1, treesz, lfno[a[i]], 1);
  }
  if (mx[1] == -2000000000)
    printf("%s\n", "Nothing");
  else
    printf("%d\n", mx[1]);
  for (int i = (int)(k); i <= (int)(n - 1); i++) {
    update(1, 1, treesz, lfno[a[i]], 1);
    update(1, 1, treesz, lfno[a[i - k]], -1);
    if (mx[1] == -2000000000)
      printf("%s\n", "Nothing");
    else
      printf("%d\n", mx[1]);
  }
  return 0;
}
