fork(2) download
  1. #!perl -p0
  2. /
  3. /;($x="($`)")=~y!#!.!;1while s/#(.*
  4. $)/%$1/+s/#$x?%|%$x?#/%$1$2%/s;1while
  5. s/#$x\./.$1#/s;y!%!#!
Success #stdin #stdout 0s 3564KB
stdin
...#..
.#..#.
.#..##
.#...#
.#####
.#...#
stdout
......
.#....
.#...#
.#..##
.#.###
.#####