def meine_funktion (a,b,reverse):
    if reverse == "False":
        return a+ " " +b
    elif reverse == "True":
        return b + " " + a

   
print("Ausgabe:")
a = input("1. Wort:")
b = input("2. Wort:")
reverse = input("Umdrehen? (True/False)")
print(meine_funktion( a, b, reverse))