SPOJ GSS3: Accepted
SPOJ HORRIBLE: Accepted