CHARACTER(150) JOGE
CHARACTER(150) BUTSUGIRI_PICTURE
INTEGER H,W
READ*,H,W

JOGE=""
DO I=1,W+2
  JOGE=TRIM(JOGE)//"#"
END DO

PRINT"(A)",TRIM(JOGE)
DO I=1,H
  READ*,BUTSUGIRI_PICTURE
  PRINT"(A)","#"//TRIM(BUTSUGIRI_PICTURE)//"#"
END DO
PRINT"(A)",TRIM(JOGE)
END