#include <bits/stdc++.h>
using namespace std;
long long int a[100005], x;
map<long long int, long long int> cnt;
set<long long int> s;
void print() {
  if (!s.size())
    cout << "Nothing\n";
  else
    cout << (*(--s.end())) << "\n";
}
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < k; i++) {
    x = a[i];
    cnt[x]++;
    if (cnt[x] == 1) s.insert(x);
    if (cnt[x] > 1)
      if (s.find(x) != s.end()) s.erase(x);
  }
  print();
  for (int i = 0; i < n - k; i++) {
    cnt[a[i]]--;
    if (cnt[a[i]] == 1) s.insert(a[i]);
    if (cnt[a[i]] == 0) s.erase(s.find(a[i]));
    x = a[i + k];
    cnt[x]++;
    if (cnt[x] == 1) s.insert(x);
    if (cnt[x] > 1)
      if (s.find(x) != s.end()) s.erase(x);
    print();
  }
  return 0;
}
