implicit real*8 (a-h, o-z)
dimension t(3000000),u(3000000),v(3000000),w(3000000),x(3000000),y(3000000),z(3000000),&
&         mesh(1000000,6),narabi(10000,10000)
integer :: j,n,t,u,v,w,x,y,z
n=8
!nの値は周方向分割数で何角形か入力する
m=3
!mの値は高さ方向分割数で何分割か入力する
!データ入力
print *,"節点数を入力して下さい"
read*, nset !節点数の読み込み
do i=1,nset
!print *,"それぞれの節点を入力して下さい"
read*, t(i),u(i),v(i),w(i),x(i),y(i),z(i)!各節点の座標値の読み込み
end do
do j=1,2
print*,t(j),",","     ",u(j),",","     ",v(j),",","     ",w(j),",","     ",x(j),",","     ",y(j),",","     "&
&,z(j)
end do
do j=4,6*n
print*,t(j),",","     ",u(j),",","     ",v(j),",","     ",w(j),",","     ",x(j),",","     ",y(j),",","     "&
&,z(j)
end do
!kは1から"(24*k+6)*n=節点数"の式からkの値を算出する
!算出したkの値が小数点の場合、算出したkの値よりも大きい整数を入力する
do k=1,12
do j=(24*k-18)*n+2,(24*k-6)*n-1
print*,t(j),",","     ",u(j),",","     ",v(j),",","     ",w(j),",","     ",x(j),",","     ",y(j),",","     "&
&,z(j)
end do
do j=(24*k-6)*n+1,24*k*n-1
print*,t(j),",","     ",u(j),",","     ",v(j),",","     ",w(j),",","     ",x(j),",","     ",y(j),",","     "&
&,z(j)
end do
do j=24*k*n+2,(24*k+6)*n
print*,t(j),",","     ",u(j),",","     ",v(j),",","     ",w(j),",","     ",x(j),",","     ",y(j),",","     "&
&,z(j)
end do
end do
end
