Bug fix to use median: 2014 round 1B problem A

Use median not mean over all input strings to get the optimal number of
letters of each character in the target word. This now passes the large
problem set.