-export([main/1]). f() ->{ok,[A,B]}=io:fread("","~d~d"),io:format("~B",[case 9>B rem 110of true->B div 100;false->A rem 10end]). main(_)->[f()||_<-lists:seq(1,32)].