Given a circular linked list, write a method to insert a node at its tail. Return the list's head.

Examples:

*x = indicates head node`Insert 1 ==> *1`

`Insert 2 ==> 1->2->*1`

`Insert 3 ==> 1->2->3->*1`

Need a **hand?** Try out these hints, one at a time.

Traverse the list till you reach the last node of the list (the next reference of the last node is the head node). Insert the new node in between the last node and the head node.

1. Create a new `ListNode`

and point it's `next`

reference to itself.

2. If the head node is `null`

, simply return the new node.

3. Else, traverse the list until the next reference of the current node points to the head node.

4. Insert the new ListNode at this position.

public ListNode insertAtTail(ListNode head, int data) { }

**C**

**Java**

**Python**