#include <bits/stdc++.h>
using namespace std;
const long long int lg = 22;
const long long int N = 1e5 + 5;
const long long int INF = 1e18 + 5;
const long long int mod = 1e9 + 7;
const double PI = 3.14159265358979323846;
template <typename T>
T power(T x, T y) {
  T ans = 1;
  while (y > 0) {
    if (y & 1LL) ans = (ans * x) % mod;
    y >>= 1LL;
    x = (x * x) % mod;
  }
  return ans % mod;
}
inline long long int mul(long long int a, long long int b) {
  return (a * 1ll * b) % mod;
}
inline long long int sub(long long int a, long long int b) {
  long long int c = a - b;
  if (c < 0) c += mod;
  return c;
}
inline long long int add(long long int a, long long int b) {
  long long int c = a + b;
  if (c >= mod) c -= mod;
  return c;
}
inline long long int inv(long long int a) { return power(a, mod - 2); }
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << '\n';
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
long long int n, k, a[N];
map<long long int, long long int> cnt;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  set<long long int> second;
  cin >> n >> k;
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
    if (i < k) {
      cnt[a[i]]++;
      if (cnt[a[i]] == 1)
        second.insert(a[i]);
      else {
        auto lb = second.lower_bound(a[i]);
        if (lb != second.end() && *lb == a[i]) second.erase(lb);
      }
    }
  }
  if (second.size()) {
    auto it = second.end();
    it--;
    cout << *it << endl;
  } else
    cout << "Nothing" << endl;
  long long int j = 0;
  for (long long int i = k; i < n; i++) {
    cnt[a[j]]--;
    cnt[a[i]]++;
    if (cnt[a[j]] == 0) {
      auto lb = second.lower_bound(a[j]);
      if (lb != second.end() && *lb == a[j]) second.erase(lb);
    }
    if (cnt[a[j]] == 1) second.insert(a[j]);
    if (cnt[a[i]] == 1) second.insert(a[i]);
    if (cnt[a[i]] > 1) {
      auto lb = second.lower_bound(a[i]);
      if (lb != second.end() && *lb == a[i]) second.erase(lb);
    }
    if (second.size()) {
      auto it = second.end();
      it--;
      cout << *it << endl;
    } else
      cout << "Nothing" << endl;
    j++;
  }
}
