public class TestNumber {
public static void main(String[] args) {
for (int i = 10000; i < 100000; i++) {
if (test(i)) {
System.out.println(i);
}
}
}
private static boolean test(int i) {
char c[] = String.valueOf(i).toCharArray();
for (int j = 0; j < c.length; j++) {
if (c[j] != c[c.length - j - 1]) {
return false;
}
}
return true;
}
}