by@paradigm_9
AC
1642ms
import std.stdio;void main(){char c;for(int x;readf!"%s"(c);write(c|=x<1))x=c&4?0:-~x%51-c%2*51;}
T K
U ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! K!!!!!!!!!!!!!!!