????
package com.javarush.task.task19.task1908;
/*
Выделяем числа
*/
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
BufferedReader fileReader = new BufferedReader(new FileReader(r.readLine()));
BufferedWriter fileWriter = new BufferedWriter(new FileWriter(r.readLine()));
StringBuilder builder = new StringBuilder();
while (fileReader.ready()){
builder.append((char) fileReader.read());
}
String text = builder.toString();
String[]strings = text.split("\\b\\d+\\b");
for (String str : strings){
if (str.equals(" ")){
fileWriter.write(str);
}
}
fileReader.close();
fileWriter.close();
r.close();
}
}