The first line contains the initial string A. It consists only of lowercase English letters, and its length is at most 50.
The second line contains the string S. Its length is between 2 and 50 inclusive, and its first character is always $. The string S consists only of lowercase English letters and $.
The third line contains the number of runs N. N is an integer from 1 to 1,000,000,000 inclusive.
The fourth line contains min and max. min is an integer from 1 to 1,000,000,000 inclusive, and max is at least min and at most min + 99.