function f(s)
c=char(strsplit(s,[10 '']));[~,i]=sort(c>32);[m,n]=size(c);c(i+repmat((0:n-1)*m,m,1))

end % this is only needed in the online interpreter to separate function from interpreter commands

s = ['Programming' 10 'Puzzles' 10 '&' 10 'Code' 10 'Golf'];
f(s)