Подскажите, где ошибка, что я не учел?
package com.javarush.task.pro.task03.task0305;
import java.util.Scanner;
/*
Три числа
*/
public class Solution {
public static void main(String[] args) {
Scanner sc = new Scanner (System.in);
int x = sc.nextInt(), y = sc.nextInt(), z = sc.nextInt();
boolean a = false, b = false, c = false;
if (x==y){
a = true;
b = true;
}
if (x == z){
a = true;
b = true;
}
if (y == z){
b = true;
c = true;
}
if (a)
System.out.println(x);
if (b)
System.out.println(y);
if (c)
System.out.println(z);
}
}