import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String a;
a = in.nextLine();
for(int i=0, j=0;i<a.length();i++,j++)
{
if((i+1)%16==1)
{
String b = Integer.toHexString(i);
//int k = b.length();
for(int k =0;k<8-b.length();k++)
{
System.out.print("0");
}
System.out.print(b+" ");
}
System.out.print(Integer.toHexString(a.charAt(i))+" ");
if(j==7){
System.out.print(" ");
j = -1;
}
if(i%16==15) {
System.out.print(a.substring(i - 15, i + 1));
if (a.length() - i >= 16)
System.out.print("\n");
}
}
}
}
考试的时候没做出来,现在回过头重新做了下,不知道对不对