Solved FASHION on spoj, greedy