def f(s,n): r=n for i in s: for j in s: p,q=s.split(i,1);a=p+q.replace(j,'',2) if len(s)-len(a)>2and'0'