you give license key represent string s consist alphanumeric character dash the string separate n 1 group n dash you give integer kWe want reformat string s group contain exactly k character group short k contain character furthermore dash insert group convert lowercase letter uppercasereturn reformatte license key Example 1input s 5f3z2e9w k 4output 5f3z2e9wexplanation the string s split part 4 charactersnote extra dash need removedExample 2input s 25g3j k 2output 25g3jexplanation the string s split part 2 character shorter mention Constraints1 slength 105s consist english letter digits dash 1 k 104