UVA677 All Walks of length "n" from the first node

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=8&page=show_problem&problem=618 [PDF](https://uva.onlinejudge.org/external/6/p677.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA677/8a4b42a5e0be4a38ff2a3711392c3991c604fa37.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA677/c1d24b7471e08bd46fcd4051f28b7e8cfc22cffa.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA677/8220f3718772f62ee0f3bf33ca219b5d5092c686.png)