My Solution to SPOJ