Given a linked list (as comma-separated values), reverse it and return the reversed list.
Output as space-separated values.
1,2,3,4,5
5 4 3 2 1