reverse linked list leetcode python solution