Rosetta Problems

Palindromic Path

https://atcoder.jp/contests/tupc2024/tasks/tupc2024_n