Find all files (type f) in the current directory (.) and its subdirectories (maxdepth 3) and pipe the output to xargs to search for the pattern "pattern" and list only the files (l) that contain it.
find . -maxdepth 3 -type f | xargs grep -l "pattern"