12 lines
216 B
Python
12 lines
216 B
Python
import re
|
|
import sys
|
|
|
|
pattern = re.compile(r"\d+")
|
|
# pattern = re.compile(r"(?<= )\d+(?= )|\d+(?= )|(^\d+$)|(?<= )\d+")
|
|
|
|
|
|
for line in sys.stdin:
|
|
x = re.findall(pattern, line)
|
|
if x:
|
|
print(" ".join(x))
|