백준 2588번
first = input()
second = input()
temp = []
for i in range(0, len(second)):
temp.append(int(second[i]) * int(first))
temp.reverse()
temp.append(int(first)*int(second))
print('\n'.join([str(x) for x in temp]))
first = input()
second = input()
temp = []
for i in range(0, len(second)):
temp.append(int(second[i]) * int(first))
temp.reverse()
temp.append(int(first)*int(second))
print('\n'.join([str(x) for x in temp]))