#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1);
const int inf = 0x3f3f3f3f;
const double esp = 1e-6;
const int maxn = 1e6 + 5;
const int mod = 1e9 + 7;
int dir[4][2] = {0, 1, 1, 0, 0, -1, -1, 0};
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
long long inv(long long b) {
  if (b == 1) return 1;
  return (mod - mod / b) * inv(mod % b) % mod;
}
long long fpow(long long n, long long k) {
  long long r = 1;
  for (; k; k >>= 1) {
    if (k & 1) r = r * n % mod;
    n = n * n % mod;
  }
  return r;
}
long long Fpow(long long n, long long k) {
  long long r = 1;
  for (; k; k >>= 1) {
    if (k & 1) r = r * n;
    n = n * n;
  }
  return r;
}
long long upd(long long x, long long v) {
  x = x + v >= mod ? x + v - mod : x + v;
  return x;
}
int Map[maxn];
priority_queue<int> q;
map<int, int> mmp;
int main() {
  int n, i, j, k;
  scanf("%d%d", &n, &k);
  for (i = 0; i < n; i++) scanf("%d", &Map[i]);
  for (i = 0; i < n; i++) {
    mmp[Map[i]]++;
    if (mmp[Map[i]] == 1) q.push(Map[i]);
    if (i >= k) {
      mmp[Map[i - k]]--;
      if (mmp[Map[i - k]] == 1) q.push(Map[i - k]);
    }
    if (i >= k - 1) {
      while (!q.empty()) {
        if (mmp[q.top()] != 1)
          q.pop();
        else
          break;
      }
      if (q.empty())
        puts("Nothing");
      else
        printf("%d\n", q.top());
    }
  }
  return 0;
}
