strings = []

while True:
    string = str(input("Enter a string: "))
    if string == "":
        break
    strings.insert(0, string)




for string in strings:
    print(string)


    
                    


