6 пункт
package com.javarush.task.task19.task1924;
import java.io.*;
import java.util.*;
/*
Самые частые байты
*/
public class Solution {
public static Map<Integer, String> map = new HashMap<Integer, String>();
static {
map.put(0, "ноль");
map.put(1, "один");
map.put(2, "два");
map.put(3, "три");
map.put(4, "четыре");
map.put(5, "пять");
map.put(6, "шесть");
map.put(7, "семь");
map.put(8, "восемь");
map.put(9, "девять");
map.put(10, "десять");
map.put(11, "одиннадцать");
map.put(12, "двенадцать");
}
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
BufferedReader in = new BufferedReader(new FileReader(reader.readLine()));
while (in.ready()) {
String[] out = in.readLine().replace(".", "").split(" ");
for (int i = 0; i < out.length; i++) {
for (Integer e : map.keySet()) {
if (out[i].equals(Integer.toString(e))) {
out[i] = map.get(e);
}
}
}
String text = String.join(" ", out) + ".";
System.out.println(text);
}
reader.close();
in.close();
}
}