import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); List list = new ArrayList<>(); for(int i=0; i list) { final String TARGET = "LOVE"; if(discover(list,TARGET)) { System.out.println("YES"); } else { System.out.println("NO"); } } static boolean discover(List list, String target) { for(String tmp : list) { if(tmp.contains(target)) { return true; } } return false; } }