Split the shuffled sentence into words based on spaces.
Create a list to hold the words with their associated indices.
Iterate over each word in the split sentence.
a. Extract the last character of the word, which is the index.
b. Remove the index from the word.
c. Add the word and its index to the list.
Sort the list of words based on their indices.
Concatenate the sorted words to form the original sentence.