#include <bits/stdc++.h>
using namespace std;
int n, k, a[100111];
set<pair<int, int>> s;
map<int, int> c;
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    c[a[i]] = 0;
  }
  for (int i = 0; i < n; i++) {
    c[a[i]]++;
    s.insert(make_pair(c[a[i]], -a[i]));
    if (i < k - 1) continue;
    if (i >= k) {
      int rev = a[i - k];
      c[rev]--;
      if (c[rev]) s.insert(make_pair(c[rev], -rev));
    }
    int res = -1;
    while (true) {
      auto it = s.begin();
      if (it->first == c[-it->second]) {
        if (it->first == 1) res = -it->second;
        break;
      } else {
        s.erase(it);
      }
    }
    if (res == -1)
      cout << "Nothing" << endl;
    else
      cout << res << endl;
  }
}
