# -*- coding: utf-8 -*- import re S = input() pattern = r'w+' segments = list(re.split(pattern, S)) matched_list = re.findall(pattern, S) max_w = 0 for s in matched_list: max_w = max(max_w, len(s)) for i in range(len(segments)): if i0 and len(matched_list[i])==max_w: print(str(segments[i]))