# Java, <s>307</s>, <s>304</s>, 303 #

This is for sure a "perfect" challenge for some Java codegolf :)

    class M{public static void main(String[]a){int c=a[0].indexOf('|'),i=c,d,v;char[]r=a[0].replace("|", "").toCharArray(),m=new char[(v=r.length+c)+c];for(;i<v;){m[i]=r[i++-c];}for(i=c;i<v;i++){if(i%c<1)System.out.println();d=m[i];System.out.print(d<49?'.':m[i-c]>d|m[i+c]>d|m[i-1]>d|m[i+1]>d?'-':m[i]);}}}
	

**Input (pipe '|' method):**

    34565432100100000000|45676543210000000000|56787654321000000110|45676543210000001221|34565432100000012321|23454321000000123432|12343210000001234543|01232100000012345654|00121000000011234543|00010000000121123432


**Output:**

    ---------..1........
    ----------..........
    ---8-------......--.
    ----------......--2-
    ---------......-----
    --------......------
    -------......-------
    .-----......-----6--
    ..---.......--------
    ...-.......-2-------