text: Case 3
code: if ( c % 2 === 1 && c1 === 0 ) { no = 1 ; var flag = 0 ; for ( i = 0 ; i < n ; i ++ ) { if ( s [ i ] === ch1 && no <= k ) { ans [ i ] = " " ; no ++ ; } if ( fr [ s [ i ] . charCodeAt ( 0 ) - " " . charCodeAt ( 0 ) ] === k && flag === 0 && ans [ i ] === " " ) { ans [ i ] = " " ; flag = 1 ; } } } document . write ( ans . join ( " " ) ) ; } else {