class Solution(object):

    def kthSmallest(self, matrix, k):
        return sorted(y for x in matrix for y in x)[k - 1]


matrix = [[1, 5, 9], [10, 11, 13], [12, 13, 15]]
k = 8
print(Solution().kthSmallest(matrix, k))

77889fb7439b1dffe6e060a999d669330d8a2b58
class Solution(object):
    <mask token>


<mask token>

class Solution(object):

    def kthSmallest(self, matrix, k):
        return sorted(y for x in matrix for y in x)[k - 1]


<mask token>

class Solution(object):

    def kthSmallest(self, matrix, k):
        return sorted(y for x in matrix for y in x)[k - 1]


<mask token>
print(Solution().kthSmallest(matrix, k))

class Solution(object):

    def kthSmallest(self, matrix, k):
        return sorted(y for x in matrix for y in x)[k - 1]


matrix = [[1, 5, 9], [10, 11, 13], [12, 13, 15]]
k = 8
print(Solution().kthSmallest(matrix, k))
