import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Scanner; public class Bugs { while (true) { if (vstupRadka == null) { break; } Scanner sc = new Scanner(vstupRadka); int n = sc.nextInt(); for (int i = 0; i < n; i++) { if (!radka.contains(slovo)) { } else { } } } } }