public static void main(String[] args) {
int input[] = { 1, 5, 1, 0, -3, 1, -3, 2, 1 };
int j = 0;
int output[] = new int[100];
Arrays.fill(a, 0);
for (int i = 0; i < 9; i++) {
if (output[input[i]] == 0) {
input[j++] = input[i];
output[input[i]]++;
}
}
for (int i = 0; i < j; i++) {
System.out.print(input[i] + " ");
}
}