int[]t="$System.in" s=t.size() o='' (2**--s).times{o+=t.collect{(char)it}.join('') for(i=s;i--&&(t[i]^=32)<96;)0} print o