### Golfscript <s>80</s> 65 6rand):^;'-'5*n+:_[^6&0^4&^6=].^1&+-1%+3/{'|'\{'o'' 'if+}/'|'n}/_ The program can be tested [here][1] [1]: http://golfscript.apphb.com/?c=NnJhbmQpOl47Jy0nNSpuKzpfW142JjBeNCZeNj1dLl4xJistMSUrMy97J3wnXHsnbycnICdpZit9Lyd8J259L18=