package main

import (
    "bufio"
    "fmt"
    "os"
    "strings"
)

func main() {
    scanner := bufio.NewScanner(os.Stdin)
    scanner.Scan()
    s := scanner.Text()
    a := strings.Split(s, " ")

    for i := len(a) - 1; i >= 0; i-- {
        fmt.Printf("%s ", a[i])
    }
}