a[999];main(i){for(i=208;--i;a[i]&&printf("%c\n",68+a[i]))a[atoi(gets(a)?:"")]=-i%4;}