Please anyone help me with this problem ? (LETS HELP ATOM)

QUESTION LINK : LETS HELP ATOM

I have written this code in C for the problem.But its giving WA. I am not able to make out where I made mistake please help me anyone.I am using Linked List to solve the problem.

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
struct node
{
char ch[1000001];
struct node *next;
};
struct node *case1(struct node *start)
{
struct node temp=(struct node)malloc(sizeof(struct node));
//char ch1[1000000];
//scanf(“%s”,ch1);
temp->next=start;
//if(start!=NULL){
char ch1[1000001];
scanf(“%s”,ch1);
int n=strlen(start->ch);
for(int i=0;i<n;i++)
{
temp->ch[i]=start->ch[i];
}
//now concate the string …
strcat(temp->ch,ch1);
//}
//else{
//scanf(“%s”,temp->ch);
//}
start=temp;
return start;
}
struct node *case2(struct node *start)
{
struct node temp=(struct node)malloc(sizeof(struct node));
int del;
scanf(“%d”,&del);
temp->next=start;
int l=strlen(start->ch)-del;
for(int i=0;i<l;i++)
{
temp->ch[i]=start->ch[i];
}
start=temp;
return start;
}
struct node case3(struct nodestart)
{
int k;
scanf(“%d”,&k);
char ca=start->ch;
printf(“%c\n”,
(ca+(k-1)));
}
struct node *case4(struct node *start)
{
struct node *ptr=start;
start=start->next;
free(ptr);
return start;
}
int main(void)
{
int q;
scanf(“%d”,&q);
struct node temp=(struct node)malloc(sizeof(struct node));
temp->next=NULL;
strcpy(temp->ch,“”);
struct node *start=temp;
while(q–>0)
{
int t;
scanf(“%d”,&t);
switch(t)
{
case 1:
start=case1(start);
break;
case 2:
start=case2(start);
break;
case 3:
case3(start);
break;
case 4:
start=case4(start);
break;
}
}
return 0;
}