program main
    use,intrinsic :: iso_fortran_env
    implicit none
    integer(int32):: i
    character(3):: s(3),ans


    do i=1,3
        read*, s(i)
    end do

    do i=1,3
        ans(i:i) = s(i)(i:i)
    end do

    print'(a)', ans
end program main