uva; solve "Bars" from Volume 124