# Get user input for n and dice number
n = int(input())
dice_number = int(input())
# Convert n to a string to easily access each digit
n_str = str(n)
# Check if the dice number is even or odd
if dice_number % 2 == 0:
# Print the digits at odd places in n
print()
for i in range(len(n_str)):
if (i + 1) % 2 != 0:
print(n_str[i], end=" ")
print()
else:
# Print the digits at even places in n
print("Digits at even places in n: ")
for i in range(len(n_str)):
if (i + 1) % 2 == 0:
print(n_str[i], end=" ")
print()
IyBHZXQgdXNlciBpbnB1dCBmb3IgbiBhbmQgZGljZSBudW1iZXIKbiA9IGludChpbnB1dCgpKQpkaWNlX251bWJlciA9IGludChpbnB1dCgpKQoKIyBDb252ZXJ0IG4gdG8gYSBzdHJpbmcgdG8gZWFzaWx5IGFjY2VzcyBlYWNoIGRpZ2l0Cm5fc3RyID0gc3RyKG4pCgojIENoZWNrIGlmIHRoZSBkaWNlIG51bWJlciBpcyBldmVuIG9yIG9kZAppZiBkaWNlX251bWJlciAlIDIgPT0gMDoKICAgICMgUHJpbnQgdGhlIGRpZ2l0cyBhdCBvZGQgcGxhY2VzIGluIG4KICAgIHByaW50KCkKICAgIGZvciBpIGluIHJhbmdlKGxlbihuX3N0cikpOgogICAgICAgIGlmIChpICsgMSkgJSAyICE9IDA6CiAgICAgICAgICAgIHByaW50KG5fc3RyW2ldLCBlbmQ9IiAiKQogICAgcHJpbnQoKQplbHNlOgogICAgIyBQcmludCB0aGUgZGlnaXRzIGF0IGV2ZW4gcGxhY2VzIGluIG4KICAgIHByaW50KCJEaWdpdHMgYXQgZXZlbiBwbGFjZXMgaW4gbjogIikKICAgIGZvciBpIGluIHJhbmdlKGxlbihuX3N0cikpOgogICAgICAgIGlmIChpICsgMSkgJSAyID09IDA6CiAgICAgICAgICAgIHByaW50KG5fc3RyW2ldLCBlbmQ9IiAiKQogICAgcHJpbnQoKQ==