#include <bits/stdc++.h>
using namespace std;
int m[1000000], f[1000000], a[1000000], b[1000000], flag;
void update(int l, int r, int x, int n) {
  if (l == r) {
    f[n] += flag;
    if (f[n] == 1)
      m[n] = x;
    else
      m[n] = -2000000000;
    return;
  }
  int mid = (l + r) / 2;
  if (x <= mid)
    update(l, mid, x, 2 * n);
  else
    update(mid + 1, r, x, 2 * n + 1);
  m[n] = -2000000000;
  if (f[2 * n] == 1) m[n] = max(m[n], m[2 * n]);
  if (f[2 * n + 1] == 1) m[n] = max(m[n], m[2 * n + 1]);
  f[n] = 1;
}
int main() {
  map<int, int> index;
  index.clear();
  int N, K;
  scanf("%d", &N);
  scanf("%d", &K);
  for (int i = 0; i <= N - 1; i++) {
    scanf("%d", &a[i]);
    b[i] = a[i];
  }
  sort(b, b + N);
  for (int i = 0; i <= N - 1; i++)
    if (index[b[i]] == 0) index[b[i]] = i + 1;
  for (int i = 0; i <= K - 1; i++) {
    flag = 1;
    update(1, N, index[a[i]], 1);
  }
  if (m[1] == -2000000000)
    printf("Nothing\n");
  else
    printf("%d\n", b[m[1] - 1]);
  for (int i = K; i <= N - 1; i++) {
    flag = 1;
    update(1, N, index[a[i]], 1);
    flag = -1;
    update(1, N, index[a[i - K]], 1);
    if (m[1] == -2000000000)
      printf("Nothing\n");
    else
      printf("%d\n", b[m[1] - 1]);
  }
  return 0;
}
