#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e15;
const long long MAX = 2e6 + 7;
const long long MOD = 1000000007;
const long double PI = 3.141592653589793238463;
const long long dx[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
const long long dy[8] = {-1, 0, 1, 1, 1, 0, -1, -1};
long long i, j, k, t, n, q, l, r, mid;
unordered_map<long long, long long> mp;
set<long long, greater<long long>> st;
long long a[MAX];
void solve() {
  cin >> n >> k;
  for (long long i = 0; i < n; i++) cin >> a[i];
  for (long long i = 0; i < k; i++) {
    if (mp[a[i]] == 1)
      st.erase(a[i]);
    else if (!mp[a[i]])
      st.insert(a[i]);
    mp[a[i]]++;
  }
  if (st.size())
    cout << *st.begin() << "\n";
  else
    cout << "Nothing"
         << "\n";
  for (long long i = k; i < n; i++) {
    if (a[i] == a[i - k]) {
      if (st.size())
        cout << *st.begin() << "\n";
      else
        cout << "Nothing"
             << "\n";
      continue;
    }
    if (mp[a[i - k]] == 1) {
      st.erase(a[i - k]);
    } else if (mp[a[i - k]] == 2)
      st.insert(a[i - k]);
    mp[a[i - k]]--;
    if (!mp[a[i]])
      st.insert(a[i]);
    else if (mp[a[i]] == 1)
      st.erase(a[i]);
    mp[a[i]]++;
    if (st.size())
      cout << *st.begin() << "\n";
    else
      cout << "Nothing"
           << "\n";
  }
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  return 0;
}
