<gh_stars>0
a = input()
b = int(input())


def repeater(string, multiplier):
    return string * multiplier


print(repeater(a, b))

a = input()
b = int(input())


def repeater(string, multiplier):
    return string * multiplier


print(repeater(a, b))