#include <stdio.h>

int main() {
	char front,input,behind;
	
	scanf("%c",&input);
	
	front = input - 1;
	behind = input + 1;
	
	printf("%c %c %c\n",front,input,behind);
	printf("%d %d %d",(int)front,(int)input,(int)behind);
	
	return 0;
}