/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;


/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
	   String[] words = {"leet","code"}; 
	   char x = 'e';
	   System.out.println(findWordsContaining(words,x));
	   
	}
	
	    static List<Integer> findWordsContaining(String[] words, char x) {
        List<Integer> list = new ArrayList<>();

        int n = words.length;

        for(int i=0;i<n;i++){
          
          if(words[i].indexOf(x) != -1){
             list.add(i);
          
          }

        }

        return list;
    }
}