x:"";y:x;f:fun(n,a,b,c){if(n>0){f(n-1,a,c,b);x~=a;y~=c;f(n-1,b,a,c);}}f(stdin.get_s(1).to_i,"A","B","C");x.p;y.p;

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page