Redirecting you to http://uva.onlinejudge.org/external/123/12342.pdf