import re
pattern = r"""(?:https?:\/\/|ftps?:\/\/|www\.)(?:(?![.,?!;:()]*(?:\s|$|"))[^\s"]){2,}"""
print(re.findall(pattern, input()))