UVa 978: first attemp