Problem statement

Given a list of sentences and an integer KK, return the KK most frequent words present in those sentences, sorted by their frequency. In case there's a tie in frequency, sort the words lexicographically.

Example

Sample input

Get hands-on with 1400+ tech skills courses.