UVA-11561: Getting Gold. Simple DFS