template for UVA 422