main(s){for(;gets(&s);)printf("digital_root(%s)=%d\n",&s,atoi()%9?:9);}