implicit none
integer :: h,w
character(100) :: str
integer :: i,j

read *,h,w

do j = 1, w+1
   write(*,'(a)',advance='no') '#'
enddo
write(*,'(a)') '#'

do i = 1, h
   read *,str
   write(*,'(a,a,a)') '#',str(1:w),'#'
enddo

do j = 1, w+1
   write(*,'(a)',advance='no') '#'
enddo
write(*,'(a)') '#'

end