Three different letters need to be placed in order from least to greatest. For example if the numbers are ordered J, M, C they should be re-ordered as C, J, M.

Which of the following algorithms can be used to place any three letters in the correct order?

A. if the first letter is belongs after the last letter, swap them. then, if the first letter is belongs after the middle letter, swap them.

B. if the first letter is belongs, after the middle letter, swap them, then, if the middle letter is belongs after the last letter, swap them.

C. if the first letter is belongs, after the middle letter, swap them, then, if the middle letter is belongs, after the last letter, swap them, then, if the first letter is belongs, after the last letter, swap them.

D. If the first letter is belongs, after the middle letter, swap them, then, if the middle letter is belongs after the last letter, swap them, then, if the first letter is belongs after the middle letter, swap them.