class Solution:
def oddEvenList(self, head: ListNode) -> ListNode:
if head is None or head.next is None:
return head
odd = head
even = head.next
evenHead = head.next
while(even and even.next):
odd.next = odd.next.next
odd = odd.next
even.next = even.next.next
even = even.next
odd.next = evenHead
return head