Fell Walking

You are creating a tour of the Peak District hills for a friend visiting from
the Netherlands.  The walk will go from the locally famous viewpoint "Hill 1"
to the world-famous viewpoint "Hill 2".

To make this friend feel at home, you want to minimise the difference in height
between the highest and lowest hills of the walk.

Given a graph of the local points of interest and paths between them, find such
an optimally-flat route.

Input
  itemize
  One line containing the number of hills,  (), and
        the number of trails connecting them,  ().
  One line containing  integers  (),
        the heights in metres of the hills from  to .
   further lines, the -th of which contains two integers  and 
        () indicating that there is a bi-directional path
        between hills  and .
  itemize

It is guaranteed that there is a path (direct or indirect) between hills  and .

Output
  Output the minimum possible distance between the maximum and minimum heights of
  hills encountered on a walk between hills  and .


