Getting Error in the python question
Given a string representing the starting number, and a maximum number of changes allowed, create the largest palindromic string of digits possible or the string '-1' if it is not possible to create a palindrome under the contstraints. Input Format: number of digits in the number maximum number of changes allowed string of numbers Output Format: highest value or -1 Sample Input: 4 1 3943 Sample Output: 3993 MY CODE: n=int(input()) c=int(input()) num=input() rev=num[::-1] l1=list_num=list(num) l2=list_rev=list(rev) c=0 for i in range(0,len(list_num)): if l1[i]==l2[i] and c!=0: pass else: l2[i]=l1[i]="9" c=c-1 if l1==l2: print("".join(l2)) else: print(-1) ERROR: Private Test Case Failed