public class PrintLeaders {
public static void main(String args[]) {
int arr[] = { 12, 7, 13, 32, 17, 1, 8 };
int i = 0;
int j;
for (i = 0; i < arr.length; i++) {
for (j = i + 1; j < arr.length; j++) {
if (arr[i] <= arr[j]) {
break;
}
}
if (j == arr.length) {
System.out.print(arr[i] + " ");
}
}
}
}