#include<stdio.h>
#include<stdlib.h>
#include<ctype.h>
struct Node{
    int  data;
    struct Node*next;
};
struct Node*createNode(int data){
    struct Node*newNode=(struct Node*)malloc(sizeof(struct Node));
    newNode->data=data;
    newNode->next=NULL;
    return newNode;
}
struct Node*insertEnd(struct Node* head,int data){
    struct Node* newNode=createNode(data);
    if(head==NULL){
        head=newNode;
        head->next=head;
        return head;
    }
    struct Node*temp=head;
    while(temp->next!=head)
    temp=temp->next;
    temp->next=newNode;
    newNode->next=head;
    return head;
}
void updateEvenNodes(struct Node*head){
    if(head==NULL)
    return;
    struct Node*current=head;
    int index=0;
    
    do{
        if(index%2==0)
        current=current->next;
        index++;
    }while(current!=head);
}
void printflist(struct Node*head){
    if(head==NULL)
    return;
    struct Node*current=head;
    do{
        printf("%d",current->data);
        current=current->next;
    }while(current!=head);
    printf("\n");
}