import sys, re
for line in sys.stdin:
print(list(map(int, line[1:-1].split())))
print(list(map(int, re.findall(r'\d+', line))))
aW1wb3J0IHN5cywgcmUKZm9yIGxpbmUgaW4gc3lzLnN0ZGluOgoJcHJpbnQobGlzdChtYXAoaW50LCBsaW5lWzE6LTFdLnNwbGl0KCkpKSkKCXByaW50KGxpc3QobWFwKGludCwgcmUuZmluZGFsbChyJ1xkKycsIGxpbmUpKSkp