*Hide-and-seek* is a childrenfs game. Players hide here and there, and one player called *it* tries to find all
the other players.

Now you played *it* and found all the players, so itfs turn to hide from *it*. Since you have got tired of
running around for finding players, you donft want to play *it* again. So you are going to hide yourself at
the place as far as possible from *it*. But where is that?

Your task is to find the place and calculate the maximum possible distance from *it* to the place to hide.

The input contains a number of test cases.

The first line of each test case contains a positive integer *N* (*N* ≤ 1000). The following N lines give
the map where hide-and-seek is played. The map consists of *N corridors*. Each line contains four real
numbers *x*_{1}, *y*_{1}, *x*_{2}, and *y*_{2}, where (*x*_{1}, *y*_{1} ) and (*x*_{2}, *y*_{2} ) indicate the two end points of the corridor. All
corridors are straight, and their widths are negligible. After these *N* lines, there is a line containing two
real numbers *sx* and *sy*, indicating the position of *it*. You can hide at an arbitrary place of any corridor,
and *it* always walks along corridors. Numbers in the same line are separated by a single space.

It is guaranteed that *its* starting position (*sx*, *sy*) is located on some corridor and linked to all corridors
directly or indirectly.

The end of the input is indicated by a line containing a single zero.

For each test case, output a line containing the distance along the corridors from eiths starting position to the farthest position. The value may contain an error less than or equal to 0.001. You may print any number of digits below the decimal point.

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

4.243

Source: ACM-ICPC Japan Alumni Group Summer Camp 2006
, Day 2, Tokyo, Japan, 2006-09-23

http://acm-icpc.aitea.net/

http://acm-icpc.aitea.net/