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