```
class Solution(object):
def oddEvenList(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
if head==None or head.next==None or head.next.next==None:
return head
odd_node=head
even_stater=head.next
while odd_node.next!= None and odd_node.next.next!=None:
even_node=odd_node.next
odd_node.next=even_node.next
odd_node=odd_node.next
even_node.next=odd_node.next
odd_node.next=even_stater
return head
```