def selective_find(str, char, index, pos):
 l = len(str)
 while 1:
  pos += 1
  if (pos == l):
   return ((-1), (-1))
  c = str[pos]
  if (c == char):
   return ((index + 1), pos)
  elif (c < char):
   index += 1

def selective_find ( str , char , index , pos ) : l = len ( str ) while 1 : pos += 1 if ( pos == l ) : return ( ( - 1 ) , ( - 1 ) ) c = str [ pos ] if ( c == char ) : return ( ( index + 1 ) , pos ) elif ( c < char ) : index += 1
return a pair .