#include #define rep(i, a, n) for(int i = a; i < (n); i++) using namespace std; using ll = long long; using P = pair; const int INF = 1001001001; const ll LINF = 1001002003004005006ll; //const int mod = 1000000007; //const int mod = 998244353; int main() { int n, k; cin >> n >> k; vector a(n); rep(i, 0, n) cin >> a[i]; map, int> mp; vector b(n-1); rep(i, 0, n-1) b[i] = a[i+1]; mp[b] = 0; rep(i, 0, n-1) { b[i] = a[i]; mp[b] = i+1; } int cnt = 1; for (auto i : mp) { for (auto j : i.first) { if (cnt == k) cout << j << " "; } if (cnt == k) cout << endl; cnt++; } }