let rec f x=let c=stdin.Read()in printf"%c"(if x<2*c/(c+1)then 'x'else char c);f((match c with|84->1|75->x-50|_->x+1)%51) f 1