def reverse(n):
	return ' '.join(x[::-1] if len(x) >= 5 else x for x in n.split())
 
print(reverse('abc abcdrd sdldslddldkd sdsldsdlsdkdsald'))