#include <bits/stdc++.h>
using namespace std;
const int maxx = 600010;
map<long long, long long> h, p;
priority_queue<long long, vector<long long>, less<long long> > q;
long long n, m, k;
long long ans = 0, total = 0, sum = 0, cnt = 0;
long long a[maxx], vis[maxx];
int main() {
  scanf("%lld%lld", &n, &k);
  for (register int i = 1; i <= n; i++) {
    scanf("%lld", &a[i]);
    if (!h.count(a[i])) h[a[i]] = ++total;
  }
  for (register int i = 1; i <= k; i++) {
    long long u = h[a[i]];
    p[u]++;
    if (p[u] == 1) {
      vis[u] = 0;
      q.push(a[i]);
    } else
      vis[u] = 1;
  }
  while (vis[h[q.top()]] && !q.empty()) {
    q.pop();
  }
  if (q.empty())
    printf("Nothing\n");
  else
    printf("%lld\n", q.top());
  for (register int i = k + 1; i <= n; i++) {
    long long u1 = h[a[i]], u2 = h[a[i - k]];
    p[u1]++, p[u2]--;
    if (p[u1] == 1) {
      vis[u1] = 0;
      q.push(a[i]);
    } else
      vis[u1] = 1;
    if (p[u2] == 1) {
      vis[u2] = 0;
      q.push(a[i - k]);
    } else
      vis[u2] = 1;
    while (!q.empty() && vis[h[q.top()]]) {
      q.pop();
    }
    if (q.empty())
      printf("Nothing\n");
    else
      printf("%lld\n", q.top());
  }
  return 0;
}
