Frogs

frog.c, frog.cpp, frog.pas, frog.java

If class equals filename, H2 should be treated slightly different.

Some entities cause problems:  , ≤, ≥, ...

Simple table
12
threefour

Constraints

We have X and Y (1 ≤ X, Y ≤ 1000) ...

For xfrog yfrog xfroggie and yfroggie there is a weird line breaking ...

Sample input

4 4
1 1 4 2

2
2 1 3 3
4 3 4 4
4 4
1 1 4 2

1
2 1 3 4
7 6
4 2 7 6

5
4 1 7 1
5 1 5 5
2 4 3 4
7 5 7 5
6 6 6 6
0 0

Sample output

14
no path found
12