For some reason it is not printing the right solution, but I think my logic is correct? What did I do wrong?
package en.codegym.task.pro.task03.task0305;
import java.util.Scanner;
/*
Three numbers
*/
public class Solution {
public static void main(String[] args) {
//write your code here
Scanner s = new Scanner(System.in);
int a = s.nextInt();
int b = s.nextInt();
int c = s.nextInt();
if (a==b & b==c){
System.out.println(a + " " + b);
}else if (a==b){
System.out.println(a +" "+b+" "+c);
}else if (a==c){
System.out.println(a + " "+c);
}else if (b==c){
System.out.println(b + " " + c);
}
}
}