#include	<stdio.h>

char	hextab[ ]	=	"0123456789ABCDEF";
/***
char	so[ ]		=	"\016\016";
***/
char	so[ ]		=	"";

main()
{
	register c;
	register i;

	i = 0;
	printf("%s", so);
	while ((c = getchar()) != EOF)  {
		out((c>>4)&0xf);
		out(c&0xf);
		if (++i >= 30)  {
			printf("%s\n", so);
			i = 0;
			}
		}

	if (i)
		printf("%s\n", so);
}

out(c)
{
	putchar(hextab[c]);
}
