empty=[] def make_text(sentence): word = sentence[-2] empty.append(word) for i in range(len(sentence)): new_word = -(sentence[len(sentence) - 1]) empty.append(new_word) return empty sentence= input() make_text() new_sentence = "".join(empty) final_sentence = sentence + new_sentence print(final_sentence)