program sample
	implicit none
	integer :: h, w, I, j
	character(100),allocatable :: c(:)

	read(*,*) h, w
	allocate(c(h))
	c(:) = 
	do i = 1, h
		read(*,*) c(i)
	end do
	do i = 1, h
		do j = 1, 2
			write(*,*) c(i)(1:w)
		end do
	end do
	
	stop
end program sample