{"raw_statement":[{"iden":"statement","content":"Yoda tends to confuse people with his irregular syntax. Write a program that takes in a string and switches the first half of the words with the second half.\n\nA line will contain a string.\n\nFor the input, your program must print that string with the first and second half of the words switched.\n\nAssume the input will always have an even number of words.\n\n"},{"iden":"input","content":"A line will contain a string."},{"iden":"output","content":"For the input, your program must print that string with the first and second half of the words switched."},{"iden":"note","content":"Assume the input will always have an even number of words."}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ S $ be a string consisting of $ 2n $ words (for some $ n \\in \\mathbb{Z}^+ $), separated by single spaces.  \nLet $ W = (w_1, w_2, \\dots, w_{2n}) $ be the sequence of words in $ S $, where each $ w_i $ is a non-empty substring of $ S $ delimited by spaces.\n\n**Constraints**  \n1. The number of words in $ S $ is even: $ |W| = 2n $ for some $ n \\geq 1 $.  \n2. Words are separated by exactly one space.  \n3. No leading or trailing spaces in input.\n\n**Objective**  \nConstruct a new string $ S' $ by swapping the first half of words with the second half:  \n$$ S' = \\text{join}\\left( (w_{n+1}, w_{n+2}, \\dots, w_{2n}, w_1, w_2, \\dots, w_n), \\text{ } \\right) $$  \nwhere $ \\text{join}(L, \\text{ }) $ concatenates the list $ L $ of words with single spaces between them.","simple_statement":"Swap the first half of words with the second half of words in the input string.","has_page_source":false}