#K50277. Duplicate Characters

    ID: 28829 Type: Default 1000ms 256MiB

Duplicate Characters

Duplicate Characters

You are given a string s consisting of only lowercase letters and an integer n. Your task is to duplicate each character of the string exactly n times and output the resulting string.

More formally, for each character \(c\) in the string \(s\), the output string should contain \(c\) repeated \(n\) times. For example, if \(s = "abc"\) and \(n = 3\), then the output should be "aaabbbccc".

Input Restrictions: The string will consist only of lowercase English letters. The integer n is a positive integer.

inputFormat

The input is read from standard input (stdin) and consists of two lines:

  1. The first line contains a non-negative string s of lowercase letters. (Note: s could be empty.)
  2. The second line contains a positive integer n, indicating the number of times each character in s should be duplicated.

outputFormat

Output a single line to standard output (stdout) containing the transformed string where each character in the input string is repeated n times.

## sample
a
3
aaa