Condition to check the row of the current character of the string
if ( first_row . count ( x ) > 0 ) { return 1 ; } else if ( second_row . count ( x ) > 0 ) { return 2 ; } else if ( third_row . count ( x ) > 0 ) { return 3 ; } else if ( fourth_row . count ( x ) > 0 ) { return 4 ; } return 0 ; }