A license key is a string of letters, digits and dashes. Remove all existing dashes, convert every letter to uppercase, then reinsert dashes so the characters form groups of exactly k characters, counting from the right. The first (leftmost) group may have fewer than k characters but must have at least one. Groups are joined by single dashes.
Input format
Line 1: the raw key s (letters, digits and dashes; at least one alphanumeric character).
Line 2: an integer k.
Output format
One line: the reformatted key.
Constraints
- 1 <= len(s) <= 100000
- 1 <= k <= 100
scontains at least one letter or digit.