It is the year 2019. Things used to be better, or at least that is what the royal cupbearer, Bajtosław, believes. After all, the older the wine, the better, so clearly, finer spirits were produced in the past.
Bajtosław now has a new reason to complain. He has always stored wine in large wooden barrels, but the latest winemaking trends dictate using only glass bottles. However, storing many bottles in the royal cellar has turned out to be quite a problem for the cupbearer. Wine racks are not cheap, and the only sensible alternative is to arrange the bottles in a pyramid against the wall: $n$ bottles in the bottom row, $n-1$ bottles on top of them, then $n-2$, and so on, up to a single bottle in the top row. This gives a total of $n \cdot (n+1)/2$ bottles. Such a pyramid is stable because every bottle rests on the floor or on two other bottles.
Bajtosław has already arranged the bottles and labeled each one with the production year of the wine inside. Suddenly, a breathless messenger rushed into the cellar and announced that the king had just thrown a spontaneous feast and immediately needed $k$ bottles of wine. Bajtosław will hand the messenger a bottle from the pyramid $k$ times, and he will designate one of the handed bottles as the finest vintage for the king himself. The cupbearer must choose the bottles in such a way that the pyramid remains stable at every moment, and the king receives the oldest possible wine. What will that vintage be?
Input
The first line of input contains two integers $n$ and $k$ ($1 \le n \le 2000$, $1 \le k \le n \cdot (n+1)/2$), representing the height of the pyramid and the number of bottles needed for the feast.
The next $n$ lines describe the successive rows of the pyramid; the $i$-th of these lines contains a sequence of $i$ integers $a_{i,1}, a_{i,2}, \dots, a_{i,i}$ ($1 \le a_{i,j} \le 2019$). The number $a_{i,j}$ represents the production year of the wine in the $j$-th bottle in the $i$-th row. Rows are numbered from the top, and bottles in each row are numbered from left to right.
Output
Output a single integer – the smallest possible production year of the wine that the king will receive.
Examples
Input 1
5 7 1999 2019 2010 850 1500 1600 900 900 710 900 1000 800 600 800 1000
Output 1
710
Note
The figure on the left shows the initial pyramid of height 5; each circle symbolizes one bottle, and the number indicates the production year of the wine.
The figure on the right shows an example sequence in which the cupbearer could have chosen the bottles: the selected bottles are marked with dashed circles, and the number indicates the order in which the given bottle was chosen (note that after each choice, the pyramid is stable). The sequentially chosen bottles have the vintages 1999, 2010, 2019, 1500, 1600, 710, and 850; the king receives the vintage 710.