fork download
  1. s = input().strip()
  2. a = s.split()
  3.  
  4. ten = a[-1]
  5. ho = a[0]
  6. dem = " ".join(a[1:-1])
  7.  
  8. print(ten)
  9. print(ho)
  10. print(dem)
  11.  
Success #stdin #stdout 0.11s 13992KB
stdin
Nguyen Viet Anh
stdout
Anh
Nguyen
Viet