#!/usr/bin/python3 import sys import re for line in sys.stdin: substrings = re.findall(r'\d+',line) if len(substrings) > 0: print(' '.join(substrings))