# 50194. Print Numbers

## I'm a slow walker, but I never walk backwards.

Write a program to print positive numbers. We want to print a positive number $n$ for $n \bmod k = t$ number of times, for a given $k$. However, there is a limit of $L$ on the number of digits we can print in a line. We will print $n$ $t$ times in the same line as the last number if that does not exceed the limit $L$. If printing $n$ in the same line does exceed the limit $L$ we check the following. If starting a new line, printing $n$ does not exceed the limit $L$, we start a new line and print $n$. If starting a new line still exceeds the limit $L$, we ignore $n$.

## Input Format

The first line of input has $k$. The second line of input has $L$. The third line has multiple $n$'s to print. You need to process all $n$ until 0. All inputs are in int type.

## Output Format

The output is as described as in the description.

## Sample Input 1

11102 14 0

## Sample Output 1

22141414

## Sample Input 2

111011 3 14 8 0

## Sample Output 2

33314141488888888

## Sample Input 3

131020 1 2 8 20 17 2 0

## Sample Output 3

122888888881717171722

## Estimated Cyclomatic Number

6.21