Rosetta Problems

Wish upon a shooting star

https://onlinejudge.u-aizu.ac.jp/problems/2586