import re
def second_smallest_word_length(text):
words = re.split(r'\s+', text.strip())
if len(words) < 2:
return -1
lengths = [len(word) for word in words]
lengths.sort()
return lengths[1]
text = "java c++ python c# javascript"
print(second_smallest_word_length(text))
'''
run:
3
'''