public class Solution {
public static void main(String[] args) throws Exception {
try (BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
FileInputStream fileInputStream = new FileInputStream(reader.readLine())){
int[] arrayOfBytes = new int[256];
while (fileInputStream.available() > 0){
arrayOfBytes[fileInputStream.read()]++;
}
int min = 255;
for (int x = 0; x < arrayOfBytes.length; x++) {
if(x > 1 & x < min){
min = x;
}
}
for (int x = 0; x < arrayOfBytes.length; x++) {
// System.out.print(arrayOfBytes[x] + " *** " + x + " ");
if (arrayOfBytes[x] == min){
System.out.print(x + " ");
}
}
} catch (IOException e){
e.printStackTrace();
}
}
}package com.javarush.task.task18.task1804;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
/*
Самые редкие байты
*/
public class Solution {
public static void main(String[] args) throws Exception {
try (BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
FileInputStream fileInputStream = new FileInputStream(reader.readLine())){
int[] arrayOfBytes = new int[255];
while (fileInputStream.available() > 0){
arrayOfBytes[fileInputStream.read()]++;
}
int min = 255;
for (int x = 0; x < arrayOfBytes.length; x++) {
if(x > 1 & x < min){
min = x;
}
}
for (int x = 0; x < arrayOfBytes.length; x++) {
// System.out.print(arrayOfBytes[x] + " *** " + x + " ");
if (arrayOfBytes[x] == min){
System.out.print(x + " ");
}
}
} catch (IOException e){
e.printStackTrace();
}
}
}