Source code :
public class abc {
public static void main(String[] args) {
int a = 64, n = 5, c = 0, d = n;
String x;
for (int i = 1; i <= n; i++) {
x = "";
if (i == d) {
n = n * 2 - 1;
}
for (int j = 1; j <= i; j++) {
if (i > d) {
if (j < d - c) {
System.out.print(j + " ");
x = x + String.valueOf((char) (a + j))+" ";
}else{
break;
}
} else {
System.out.print(j + " ");
x = x + String.valueOf((char) (a + j))+" ";
}
}
if (i > d) {
c++;
}
System.out.print(" "+x);
System.out.println("");
}
}
}
public static void main(String[] args) {
int a = 64, n = 5, c = 0, d = n;
String x;
for (int i = 1; i <= n; i++) {
x = "";
if (i == d) {
n = n * 2 - 1;
}
for (int j = 1; j <= i; j++) {
if (i > d) {
if (j < d - c) {
System.out.print(j + " ");
x = x + String.valueOf((char) (a + j))+" ";
}else{
break;
}
} else {
System.out.print(j + " ");
x = x + String.valueOf((char) (a + j))+" ";
}
}
if (i > d) {
c++;
}
System.out.print(" "+x);
System.out.println("");
}
}
}