CJam, <s>152 149 148 145 144 140</s> 139 bytes, printable
-------------------------------

    ". QH%$ydK0]cg:WSSlFu0z>O$T1<hO)Q63@D7;\KDJ^!NQN!tFr'>x@*!nf`Ut<s=N_[\%Ec0AXXZ`hayqIi'qj)jnonEj!n(ZjpjW("31f-96b2b'[,65>_m*]z{~SS+?S}%52/N*


Thanks Dennis for pointers.

Pretty straightforward approach

[Try it online here][1]

(Now only if I knew how to do a non printable character version)

  [1]: http://cjam.aditsu.net/