Given a string S and an integer K. The task is to find lexicographically largest subsequence of S, say T, such that every character in T must occur at least K times.

Examples:

Input : S = "banana", K = 2.

Output : nn

Possible subsequence where each character exists at least 2 times are:

From the above subsequences, "nn" is the lexicographically largest.

## Comments