#include <bits/stdc++.h>
using namespace std;
const int inf = 1000000404;
const long long MOD = 1000000007ll;
const long double PI = acos(-1.0);
const long long INF = 2000000000000000000ll;
const long double EPS = 1e-9;
template <typename T>
inline T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
template <typename T>
inline T lcm(T a, T b) {
  return a * (b / gcd(a, b));
}
template <typename T>
inline T sqr(T a) {
  return a * a;
}
inline bool pal(string &x) {
  int n = (int)x.length();
  for (int i = 0; i < n / 2; i++) {
    if (x[i] != x[n - i - 1]) return 0;
  }
  return 1;
}
int month[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
int dx8[] = {1, 1, 1, 0, 0, -1, -1, -1};
int dy8[] = {-1, 0, 1, 1, -1, -1, 0, 1};
int SQ = 400;
map<int, int> s2;
set<int> s1;
int a[111111];
void solve() {
  int n, k;
  cin >> n >> k;
  for (int i = 1; i < n + 1; i++) cin >> a[i];
  for (int i = 1; i < k + 1; i++) {
    if (s2.count(a[i])) {
      s2[a[i]]++;
      continue;
    }
    if (s1.count(a[i])) {
      s1.erase(a[i]);
      s2[a[i]] = 2;
    } else {
      s1.insert(a[i]);
    }
  }
  if (s1.empty())
    cout << "Nothing" << endl;
  else
    cout << *s1.rbegin() << endl;
  for (int i = k + 1; i < n + 1; i++) {
    if (s1.count(a[i - k])) {
      s1.erase(a[i - k]);
    } else {
      s2[a[i - k]]--;
      if (s2[a[i - k]] == 1) {
        s1.insert(a[i - k]);
        s2.erase(a[i - k]);
      } else if (s2[a[i - k]] == 0)
        s2.erase(a[i - k]);
    }
    if (s2.count(a[i])) {
      s2[a[i]]++;
    } else {
      if (s1.count(a[i])) {
        s1.erase(a[i]);
        s2[a[i]] = 2;
      } else
        s1.insert(a[i]);
    }
    if (s1.empty())
      cout << "Nothing" << endl;
    else
      cout << *s1.rbegin() << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  };
  getchar();
  getchar();
  return 0;
}
