def step_1c(w):
 if ((len(w) > 2) and w.endswith(('y', 'Y')) and is_consonant(w[(-2)])):
  return (w[:(-1)] + 'i')
 return w

def step_1c ( w ) : if ( ( len ( w ) > 2 ) and w . endswith ( ( 'y' , 'Y' ) ) and is_consonant ( w [ ( - 2 ) ] ) ) : return ( w [ : ( - 1 ) ] + 'i' ) return w
step 1c replaces suffix -y or -y by -i if preceded by a non-vowel which is not the first letter of the word .