#!/bin/python3 import sys from itertools import combinations def pali(b): r='' for i in range(len(b)-1,-1,-1): r=r+b[i] if(b==r): return 1 else: return 0 def a1(n,i,j,s): a=[] c=0 if(i<=j