#include <bits/stdc++.h>
using namespace std;
int arr[100005];
pair<int, int> arr_input[100005];
int index_num[100005];
int occur[100005];
struct node {
  int val;
  node *left, *right;
  node(int v, node* l, node* r) { val = v, left = l, right = r; }
  node* build(int start, int end) {
    if (start == end) return new node(0, NULL, NULL);
    int mid = (start + end) / 2;
    return new node(0, build(start, mid), build(mid + 1, end));
  }
  node* update(int start, int end, int x, int v) {
    int mid = (start + end) / 2;
    if (start == end) {
      val = v;
    } else if (x <= mid) {
      left = left->update(start, mid, x, v);
      val = max(left->val, right->val);
    } else {
      right = right->update(mid + 1, end, x, v);
      val = max(left->val, right->val);
    }
    return this;
  }
};
int main() {
  int n, k, a;
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> arr_input[i].first;
    arr_input[i].second = i;
  }
  sort(arr_input + 1, arr_input + n + 1);
  int i = 1, h, maxElem = 0;
  while (i <= n) {
    h = i;
    maxElem++;
    index_num[maxElem] = arr_input[h].first;
    while (i <= n && arr_input[i].first == arr_input[h].first) {
      arr[arr_input[i].second] = maxElem;
      i++;
    }
  }
  node* root = new node(0, NULL, NULL);
  root = root->build(1, maxElem);
  for (int i = 1; i <= k; i++) {
    occur[arr[i]]++;
    if (occur[arr[i]] == 1) {
      root->update(1, maxElem, arr[i], arr[i]);
    } else {
      root->update(1, maxElem, arr[i], 0);
    }
  }
  a = index_num[root->val];
  if (a == 0)
    cout << "Nothing" << endl;
  else
    cout << a << endl;
  for (int i = k + 1; i <= n; i++) {
    h = arr[i - k];
    occur[h]--;
    if (occur[h] == 0) {
      root->update(1, maxElem, h, 0);
    } else if (occur[h] == 1) {
      root->update(1, maxElem, h, h);
    }
    h = arr[i];
    occur[h]++;
    if (occur[h] == 2) {
      root->update(1, maxElem, h, 0);
    } else if (occur[h] == 1) {
      root->update(1, maxElem, h, h);
    }
    a = index_num[root->val];
    if (a == 0)
      cout << "Nothing" << endl;
    else
      cout << a << endl;
  }
  return 0;
}
