PROGRAM ATCODER

implicit none
integer :: h,w,i,j
character(len=100),allocatable :: c(:)

read(*,*) h,w
allocate(c(h))

do i = 1, h
  read(*,*) c(i)
  write(*,'(a)') trim(c(i))
  write(*,'(a)') trim(c(i))
end do

contains
!!!!!! サブルーチンは↓
!!!!!!

END PROGRAM ATCODER