#include <bits/stdc++.h>
using namespace std;
long long modular_pow(long long int base, long long int exponent) {
  if (exponent == 0)
    return 1;
  else if (exponent % 2 == 0) {
    long long int res = modular_pow(base, exponent / 2);
    return (res * res);
  } else {
    return (modular_pow(base, exponent - 1) * base);
  }
}
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
bool chek(int x) { return (x && !(x & (x - 1))); }
int onebits(int n) { return __builtin_popcount(n); }
long long a[2 * 100001];
class comp {
 public:
  bool operator()(pair<long long, long long> x, pair<long long, long long> y) {
    if (x.first == y.first)
      return x.second > y.second;
    else
      return x.first < y.first;
  }
};
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 1; i <= n; i++) cin >> (a[i]);
  set<pair<long long, long long>, comp> q;
  map<long long, long long> mm;
  for (int i = 1; i <= k; i++) {
    mm[a[i]]++;
  }
  for (map<long long, long long>::iterator i = mm.begin(); i != mm.end(); i++) {
    pair<long long, long long> uu = make_pair(i->second, i->first);
    q.insert(uu);
  }
  pair<long long, long long> ans = *q.begin();
  if (ans.first == 1)
    cout << ans.second << endl;
  else
    puts("Nothing");
  int uu = 1;
  for (int j = 2; j <= n - k + 1; j++) {
    mm[a[uu]]--;
    set<pair<long long, long long> >::iterator uhh =
        q.find(make_pair(mm[a[uu]] + 1, a[uu]));
    q.erase(uhh);
    if (mm[a[uu]] > 0) q.insert(make_pair(mm[a[uu]], a[uu]));
    uu++;
    mm[a[j + k - 1]]++;
    if (q.find(make_pair(mm[a[j + k - 1]] - 1, a[j + k - 1])) != q.end()) {
      set<pair<long long, long long> >::iterator uh =
          q.find(make_pair(mm[a[j + k - 1]] - 1, a[j + k - 1]));
      q.erase(uh);
      q.insert(make_pair(mm[a[j + k - 1]], a[j + k - 1]));
    } else
      q.insert(make_pair(mm[a[j + k - 1]], a[j + k - 1]));
    ans = *(q.begin());
    if (ans.first == 1)
      cout << ans.second << endl;
    else
      puts("Nothing");
  }
  return 0;
}
