This page is still under construction.

Parts of this page are still being built. What you see may change.

What Is Your Handle

Interview

Time limit1sMemory limit512 MB

Summary
Sort N distinct handles by ASCII dictionary order and print the I-th one.
Level

Easy2 of 10

Topics
Sorting, String, Implementation
Solved
No attempts yet

Problem

On online judges and in programming contests, each participant is known by an ID, also called a handle. Many people reuse the same handle across sites, and a famous user's handle is sometimes used like a nickname.

Sangmin uses the handle qilip. However, Hyeonjeong only remembers that it starts with q and ends with p, so she calls him qp. Determined to defend his identity, Sangmin wants to imprint his real handle on her.

Hyeonjeong is bad at matching names to faces, but she has one peculiar talent: she remembers the rank of every handle she knows once those handles are arranged in dictionary order. Given the list of handles she knows and an integer II, find the handle ranked II-th in dictionary order.

Input

The first line contains NN, the number of handles Hyeonjeong knows, and II, the rank to find (1≤I≤N≤1001 \le I \le N \le 100).

Each of the following NN lines contains one handle in random order. Every handle consists of lowercase English letters and digits only, with length between 11 and 2020 inclusive. All handles are distinct.

Output

Print the II-th handle in dictionary order on one line.

Dictionary order here is defined as follows. Digits come before letters, smaller digits come first, and earlier letters come first. If one string is a prefix of another, the shorter one comes first.

Examples2

  1. Example 1

    Input
    4 1
    acka1357
    spectaclehong
    mitslll
    luke0201
    
    Expected output
    acka1357
    
  2. Example 2

    Input
    9 7
    tourist
    petr
    qilip
    won0114
    hmy3743
    jujh97
    hjhj97
    bio8641
    kangjieun9843
    
    Expected output
    qilip