a, b = int(input()), input() print(*[a*int(i) for i in b][::-1], a*int(b))