Create UVa 592

I can't do it... AC is so hard