#include <bits/stdc++.h>
using namespace std;
void printvector(std::vector<long long> v) {
  for (long long i = 0; i < v.size(); ++i) {
    cout << v[i] << " ";
  }
  cout << "" << endl;
}
void printarray(long long a[], long long n) {
  for (long long i = 0; i < n; ++i) {
    cout << a[i] << " ";
  }
  cout << "" << endl;
}
void solve() {
  long long n, k;
  cin >> n >> k;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  std::vector<long long> ans(n - k + 1, -1);
  map<long long, long long> m;
  set<long long> s;
  for (long long i = 0; i < k; i++) m[a[i]]++;
  for (auto it : m)
    if (it.second == 1) s.insert(it.first);
  for (long long i = 0; i < n - k + 1; i++) {
    if (s.size() != 0) {
      ans[i] = *(s.rbegin());
    }
    m[a[i]]--;
    if (m[a[i]] == 0) s.erase(s.lower_bound(a[i]));
    if (m[a[i]] == 1) s.insert(a[i]);
    if (i + k < n) {
      m[a[i + k]]++;
      if (m[a[i + k]] == 2) s.erase(s.lower_bound(a[i + k]));
      if (m[a[i + k]] == 1) s.insert(a[i + k]);
    }
  }
  for (long long i = 0; i < n - k + 1; i++) {
    if (ans[i] == -1)
      cout << "Nothing" << endl;
    else
      cout << ans[i] << endl;
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}
