$o{$_}=++$i for <{D,C,H,S}{A,2,3,4,5,6,7,8,9,10,J,Q,K}>; <>;@a=<>=~/\S+/g;print join$",sort{$o{$a}-$o{$b}}@a