#include <bits/stdc++.h>
using namespace std;
const long long int inf = 100000000000005;
const long long int mod = 1e9 + 7;
set<long long int> s1, s2;
map<long long int, int> hs;
int n, k;
long long int a[100005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> k;
  for (int i = (0); i < (k); i++) {
    cin >> a[i];
    hs[a[i]]++;
    if (hs[a[i]] == 1)
      s1.insert(a[i]);
    else if (hs[a[i]] == 2) {
      s1.erase(a[i]);
      s2.insert(a[i]);
    }
  }
  if (s1.size() == 0)
    cout << "Nothing" << endl;
  else
    cout << *(--(s1.end())) << endl;
  for (int i = (k); i < (n); i++) {
    cin >> a[i];
    hs[a[i - k]]--;
    if (hs[a[i - k]] == 0)
      s1.erase(a[i - k]);
    else if (hs[a[i - k]] == 1) {
      s2.erase(a[i - k]);
      s1.insert(a[i - k]);
    }
    hs[a[i]]++;
    if (hs[a[i]] == 1)
      s1.insert(a[i]);
    else if (hs[a[i]] == 2) {
      s1.erase(a[i]);
      s2.insert(a[i]);
    }
    if (s1.size() == 0)
      cout << "Nothing" << endl;
    else
      cout << *(--(s1.end())) << endl;
  }
  return 0;
}
